我喜欢ascii艺术,并且很无聊,所以我找到了一些ascii角色并开始制作随机物品,8位马里奥城堡,迷宫和拱门。我发现拱门可以轻松地以整齐的方式堆叠。
╔═══════╗
║╔═════╗║
║║╔═══╗║║
║║║╔═╗║║║
╨╨╨╨─╨╨╨╨
挑战
创建一个程序,函数或任何其他可接受大于或等于0的整数的标准格式(除非您正在做奖金),并输出具有指定足弓数量的ascii art。
测试用例
输入:
7
输出:
╔═════════════╗
║╔═══════════╗║
║║╔═════════╗║║
║║║╔═══════╗║║║
║║║║╔═════╗║║║║
║║║║║╔═══╗║║║║║
║║║║║║╔═╗║║║║║║
╨╨╨╨╨╨╨─╨╨╨╨╨╨╨
替代:
+-------------+
|+-----------+|
||+---------+||
|||+-------+|||
||||+-----+||||
|||||+---+|||||
||||||+-+||||||
||||||| |||||||
---------------
输入:
1
输出:
╔═╗
╨─╨
替代:
+-+
| |
---
- 如果整数为0,则不输出任何内容
- 这个问题将在utf-8中进行,每个字符都将计为一个“字节”
- 这是codegolf,因此最短的答案会获胜。
- 您可以选择使用
+-+
代替╔═╗
,---
代替╨─╨
,和|
代替║
奖励(尚未决定是否允许在替代版本上使用,因为它不会那么难)
如果程序支持负数并像这样翻转拱门,则为-10%
╥╥╥╥─╥╥╥╥
║║║╚═╝║║║
║║╚═══╝║║
║╚═════╝║
╚═══════╝
+---+
顶部,侧面|
和底部的拱形,-----
对我来说不错。Juanpotato,如果要使用非ASCII字符,请在问题中指出编码。就目前情况而言,我投票决定关闭尚不清楚。