给定一个非负整数,打印出X
那么大的整数。X
是input的输出0
,您将在每个方向上添加等于输入的斜线以扩展X
较大的输入。
测试用例
0
X
1个
\ /
X
/ \
2
\ /
\ /
X
/ \
/ \
...
10
\ /
\ /
\ /
\ /
\ /
\ /
\ /
\ /
\ /
\ /
X
/ \
/ \
/ \
/ \
/ \
/ \
/ \
/ \
/ \
/ \
规则
您可以打印输出,或从函数返回字符串或字符串列表。允许尾随换行符以及不影响显示的额外内部空白。
这是代码高尔夫球,因此最短答案以字节为单位!
X
在中间处理(我添加它的部分原因),我会感到惊讶,但谁知道:D