您的任务是创建一个程序或函数,该程序或函数将n
1到25(含)之间的自然数()作为输入,并打印带有n
梯级数的滑梯和梯子的等轴测图。
梯子和滑轨规格
梯子始终位于左侧,幻灯片始终位于右侧。我们正在从梯子一侧查看它,因此幻灯片的一部分在前三层被遮盖了。梯级由四个破折号(----
)表示,梯子的侧面由斜线(/
和\
)表示。下图是表示具有五个梯级的幻灯片所需的空间模式的示意图。
Slide Blank space count
/----/\ 1234/----/\
/----/ \ 123/----/12\
/----/ \ 12/----/1234\
/----/ \ \ 1/----/1\1234\
/----/ \ \ /----/123\1234\
例子
>>1
/----/\
>>3
/----/\
/----/ \
/----/ \
>>4
/----/\
/----/ \
/----/ \
/----/ \ \
>>10
/----/\
/----/ \
/----/ \
/----/ \ \
/----/ \ \
/----/ \ \
/----/ \ \
/----/ \ \
/----/ \ \
/----/ \ \
这是代码高尔夫球,因此字节数最少的答案会获胜。
注意:输出中可以使用尾随空格,只要空格不超过行的长度即可。