题解 | #金字塔图案#
金字塔图案
http://www.nowcoder.com/practice/d84e8339f9444bb6b29bd3f227c8e538
- 分清楚*号的输入输出规则即可。。。。
while True:
try:
x = int(input())
for i in range(x):
print(" "*(x-1-i) + "* "*(i+1))
except:
break
金字塔图案
http://www.nowcoder.com/practice/d84e8339f9444bb6b29bd3f227c8e538
while True:
try:
x = int(input())
for i in range(x):
print(" "*(x-1-i) + "* "*(i+1))
except:
break
相关推荐