Menggunakan ASCII untuk mencetak bagian dari ubin cincin segi enam.
Inilah bagian kecil:
/\__/\
/_/ \_\
/\__/\ \__/ /\__/\
/_/ \_\/__\/_/ \_\
\ \__/ /\__/\ \__/ /
\/__\/_/ \_\/__\/
/\__/\ \__/ /\__/\
/_/ \_\/__\/_/ \_\
\ \__/ /\__/\ \__/ /
\/__\/_/ \_\/__\/
\ \__/ /
\/__\/
Inilah bagian yang lebih besar:
\ \__/ /\__/\ \__/ /\__/\ \__/ /\__/\ \__/ /\__/\
\/__\/_/ \_\/__\/_/ \_\/__\/_/ \_\/__\/_/ \_\
/\__/\ \__/ /\__/\ \__/ /\__/\ \__/ /\__/\ \__/ /
/_/ \_\/__\/_/ \_\/__\/_/ \_\/__\/_/ \_\/__\/
\ \__/ /\__/\ \__/ /\__/\ \__/ /\__/\ \__/ /\__/\
\/__\/_/ \_\/__\/_/ \_\/__\/_/ \_\/__\/_/ \_\
/\__/\ \__/ /\__/\ \__/ /\__/\ \__/ /\__/\ \__/ /
/_/ \_\/__\/_/ \_\/__\/_/ \_\/__\/_/ \_\/__\/
\ \__/ /\__/\ \__/ /\__/\ \__/ /\__/\ \__/ /\__/\
\/__\/_/ \_\/__\/_/ \_\/__\/_/ \_\/__\/_/ \_\
/\__/\ \__/ /\__/\ \__/ /\__/\ \__/ /\__/\ \__/ /
/_/ \_\/__\/_/ \_\/__\/_/ \_\/__\/_/ \_\/__\/
Tantangan
Diberikan 2 bilangan bulat h
dan w
, di mana h
tinggi dan w
lebarnya, menghasilkan hxw
bagian dari ubin cincin segi enam.
Contohnya
Input 1
4x4
Output 1
/\__/\ \__/ /\__/\ \__/ /
/_/ \_\/__\/_/ \_\/__\/
\ \__/ /\__/\ \__/ /\__/\
\/__\/_/ \_\/__\/_/ \_\
/\__/\ \__/ /\__/\ \__/ /
/_/ \_\/__\/_/ \_\/__\/
\ \__/ /\__/\ \__/ /\__/\
\/__\/_/ \_\/__\/_/ \_\
/\__/\ \__/ /\__/\ \__/ /
/_/ \_\/__\/_/ \_\/__\/
\ \__/ /\__/\ \__/ /\__/\
\/__\/_/ \_\/__\/_/ \_\
/\__/\ \__/ /\__/\ \__/ /
/_/ \_\/__\/_/ \_\/__\/
\ \__/ /\__/\ \__/ /\__/\
\/__\/_/ \_\/__\/_/ \_\
Input 2
3x3
Keluaran 2
/\__/\ \__/ /\__/\
/_/ \_\/__\/_/ \_\
\ \__/ /\__/\ \__/ /
\/__\/_/ \_\/__\/
/\__/\ \__/ /\__/\
/_/ \_\/__\/_/ \_\
\ \__/ /\__/\ \__/ /
\/__\/_/ \_\/__\/
/\__/\ \__/ /\__/\
/_/ \_\/__\/_/ \_\
\ \__/ /\__/\ \__/ /
\/__\/_/ \_\/__\/
Input 3
1x3
Keluaran 3
/\__/\ \__/ /\__/\
/_/ \_\/__\/_/ \_\
\ \__/ /\__/\ \__/ /
\/__\/_/ \_\/__\/
Masukan 4
3x6
Keluaran 4
/\__/\ \__/ /\__/\ \__/ /\__/\ \__/ /
/_/ \_\/__\/_/ \_\/__\/_/ \_\/__\/
\ \__/ /\__/\ \__/ /\__/\ \__/ /\__/\
\/__\/_/ \_\/__\/_/ \_\/__\/_/ \_\
/\__/\ \__/ /\__/\ \__/ /\__/\ \__/ /
/_/ \_\/__\/_/ \_\/__\/_/ \_\/__\/
\ \__/ /\__/\ \__/ /\__/\ \__/ /\__/\
\/__\/_/ \_\/__\/_/ \_\/__\/_/ \_\
/\__/\ \__/ /\__/\ \__/ /\__/\ \__/ /
/_/ \_\/__\/_/ \_\/__\/_/ \_\/__\/
\ \__/ /\__/\ \__/ /\__/\ \__/ /\__/\
\/__\/_/ \_\/__\/_/ \_\/__\/_/ \_\
Klarifikasi
- Pertanyaan saya mirip dengan yang ini: Me Want Honeycomb .
- Input akan berada pada satu baris dalam formulir
hxw
. - Output ke stdout (atau yang serupa).
- Ini adalah kode-golf sehingga jawaban terpendek dalam byte menang.