题解 | #空心三角形图案#
空心三角形图案
https://www.nowcoder.com/practice/2ccc5fca423e47f0b622fe6f151cfab4
while True: try: n = int(input()) print('*') for i in range(1, n-1): print('*' + ' ' * (2*i-1) + '*') print('* ' * n) except: break
空心三角形图案
https://www.nowcoder.com/practice/2ccc5fca423e47f0b622fe6f151cfab4
while True: try: n = int(input()) print('*') for i in range(1, n-1): print('*' + ' ' * (2*i-1) + '*') print('* ' * n) except: break
相关推荐