ASCII का उपयोग करके हेक्सागोन रिंग टाइलिंग के एक सेक्शन को प्रिंट करें।
यहाँ एक छोटा सा खंड है:
/\__/\
/_/ \_\
/\__/\ \__/ /\__/\
/_/ \_\/__\/_/ \_\
\ \__/ /\__/\ \__/ /
\/__\/_/ \_\/__\/
/\__/\ \__/ /\__/\
/_/ \_\/__\/_/ \_\
\ \__/ /\__/\ \__/ /
\/__\/_/ \_\/__\/
\ \__/ /
\/__\/
यहाँ एक बड़ा खंड है:
\ \__/ /\__/\ \__/ /\__/\ \__/ /\__/\ \__/ /\__/\
\/__\/_/ \_\/__\/_/ \_\/__\/_/ \_\/__\/_/ \_\
/\__/\ \__/ /\__/\ \__/ /\__/\ \__/ /\__/\ \__/ /
/_/ \_\/__\/_/ \_\/__\/_/ \_\/__\/_/ \_\/__\/
\ \__/ /\__/\ \__/ /\__/\ \__/ /\__/\ \__/ /\__/\
\/__\/_/ \_\/__\/_/ \_\/__\/_/ \_\/__\/_/ \_\
/\__/\ \__/ /\__/\ \__/ /\__/\ \__/ /\__/\ \__/ /
/_/ \_\/__\/_/ \_\/__\/_/ \_\/__\/_/ \_\/__\/
\ \__/ /\__/\ \__/ /\__/\ \__/ /\__/\ \__/ /\__/\
\/__\/_/ \_\/__\/_/ \_\/__\/_/ \_\/__\/_/ \_\
/\__/\ \__/ /\__/\ \__/ /\__/\ \__/ /\__/\ \__/ /
/_/ \_\/__\/_/ \_\/__\/_/ \_\/__\/_/ \_\/__\/
चुनौती
2 पूर्णांक h
और w
, जहां h
ऊंचाई है और w
चौड़ाई है, को देखते हुए hxw
एक षट्भुज वलय टाइलिंग के एक खंड का उत्पादन करता है ।
उदाहरण
इनपुट 1
4x4
आउटपुट 1
/\__/\ \__/ /\__/\ \__/ /
/_/ \_\/__\/_/ \_\/__\/
\ \__/ /\__/\ \__/ /\__/\
\/__\/_/ \_\/__\/_/ \_\
/\__/\ \__/ /\__/\ \__/ /
/_/ \_\/__\/_/ \_\/__\/
\ \__/ /\__/\ \__/ /\__/\
\/__\/_/ \_\/__\/_/ \_\
/\__/\ \__/ /\__/\ \__/ /
/_/ \_\/__\/_/ \_\/__\/
\ \__/ /\__/\ \__/ /\__/\
\/__\/_/ \_\/__\/_/ \_\
/\__/\ \__/ /\__/\ \__/ /
/_/ \_\/__\/_/ \_\/__\/
\ \__/ /\__/\ \__/ /\__/\
\/__\/_/ \_\/__\/_/ \_\
इनपुट 2
3x3
आउटपुट 2
/\__/\ \__/ /\__/\
/_/ \_\/__\/_/ \_\
\ \__/ /\__/\ \__/ /
\/__\/_/ \_\/__\/
/\__/\ \__/ /\__/\
/_/ \_\/__\/_/ \_\
\ \__/ /\__/\ \__/ /
\/__\/_/ \_\/__\/
/\__/\ \__/ /\__/\
/_/ \_\/__\/_/ \_\
\ \__/ /\__/\ \__/ /
\/__\/_/ \_\/__\/
इनपुट 3
1x3
आउटपुट 3
/\__/\ \__/ /\__/\
/_/ \_\/__\/_/ \_\
\ \__/ /\__/\ \__/ /
\/__\/_/ \_\/__\/
इनपुट 4
3x6
आउटपुट 4
/\__/\ \__/ /\__/\ \__/ /\__/\ \__/ /
/_/ \_\/__\/_/ \_\/__\/_/ \_\/__\/
\ \__/ /\__/\ \__/ /\__/\ \__/ /\__/\
\/__\/_/ \_\/__\/_/ \_\/__\/_/ \_\
/\__/\ \__/ /\__/\ \__/ /\__/\ \__/ /
/_/ \_\/__\/_/ \_\/__\/_/ \_\/__\/
\ \__/ /\__/\ \__/ /\__/\ \__/ /\__/\
\/__\/_/ \_\/__\/_/ \_\/__\/_/ \_\
/\__/\ \__/ /\__/\ \__/ /\__/\ \__/ /
/_/ \_\/__\/_/ \_\/__\/_/ \_\/__\/
\ \__/ /\__/\ \__/ /\__/\ \__/ /\__/\
\/__\/_/ \_\/__\/_/ \_\/__\/_/ \_\
स्पष्टीकरण
- मेरा प्रश्न इसके समान है: मी वांट हनीकॉम्ब ।
- फॉर्म में इनपुट एक ही लाइन पर होगा
hxw
। - स्टडआउट (या कुछ इसी तरह) के लिए आउटपुट।
- यह कोड-गोल्फ है इसलिए बाइट्स में सबसे कम जवाब जीतता है।