挑战
给定一个整数n
(其中4<=n<=10**6
)作为输入,使用下面示例中的符号创建一个ASCII艺术“监狱门” * ,该字体测量n-1
字符宽和n
字符高。
例
╔╦╗
╠╬╣
╠╬╣
╚╩╝
使用的字符如下:
┌───────────────┬─────────┬───────┐
│ Position │ Symbol │ Char │
├───────────────┼─────────┼───────┤
│ Top Left │ ╔ │ 9556 │
├───────────────┼─────────┼───────┤
│ Top │ ╦ │ 9574 │
├───────────────┼─────────┼───────┤
│ Top Right │ ╗ │ 9559 │
├───────────────┼─────────┼───────┤
│ Right │ ╣ │ 9571 │
├───────────────┼─────────┼───────┤
│ Bottom Right │ ╝ │ 9565 │
├───────────────┼─────────┼───────┤
│ Bottom │ ╩ │ 9577 │
├───────────────┼─────────┼───────┤
│ Bottom Left │ ╚ │ 9562 │
├───────────────┼─────────┼───────┤
│ Left │ ╠ │ 9568 │
├───────────────┼─────────┼───────┤
│ Inner │ ╬ │ 9580 │
└───────────────┴─────────┴───────┘
规则
- 只要标准I / O规则允许,您可以通过任何合理,方便的方式进行输入。
- 为了解决这一挑战,在用于构建“门”的符号为多字节字符的语言中,它们可能会以单个字节的形式计入您的分数。
- 所有其他字符(单字节或多字节)应视为正常字符。
- 输出可能不包含任何尾随空格,但如果绝对必要,则允许尾随换行符。
- 这是代码高尔夫球,因此最低字节数为准。
测试用例
Input: 4
Output:
╔╦╗
╠╬╣
╠╬╣
╚╩╝
Input: 8
Output:
╔╦╦╦╦╦╗
╠╬╬╬╬╬╣
╠╬╬╬╬╬╣
╠╬╬╬╬╬╣
╠╬╬╬╬╬╣
╠╬╬╬╬╬╣
╠╬╬╬╬╬╣
╚╩╩╩╩╩╝
Input: 20
Output:
╔╦╦╦╦╦╦╦╦╦╦╦╦╦╦╦╦╦╗
╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
╚╩╩╩╩╩╩╩╩╩╩╩╩╩╩╩╩╩╝
*是的,我知道它越大,看起来越像监狱门!:D
╬
甚至╬
可以在其代码页中包含低谷吗?如果不是,那么"'Z“ζ
允许以一个字节为单位(或2个字节)为单位吗?(推送9580,转换为unicode)?
"'Z“ζ
等于一个字节就好像是在javascript中"╬"
花费1字节