赞
踩
n,shape = input().split()
s = 1
i = 1
while eval(n)>=s:
i += 1
s = s+(2*i-1)*2
for j in range(i-1,0,-1):
print((' '*(i-1-j))+(shape*(j*2-1)))
for j in range(2,i):
print((' '*(i-1-j))+(shape*(j*2-1)))
print(eval(n)-sum((2*j-1)*2 for j in range(2,i))-1)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。