题解 | #空心三角形图案#
空心三角形图案
http://www.nowcoder.com/practice/2ccc5fca423e47f0b622fe6f151cfab4
while True:
try:
num = int(input())
a = 1
for i in range(num):
if i == 0:
print("*")
elif i == num - 1:
print("* " * num)
else:
print("*" + " " * a + "*")
a += 2
except:
break