def kzkz(ceng): for i in range(1,ceng+1): print(" "*(ceng-i),end=‘‘) n=i while(n>=1): print(n,end=‘‘) n-=1 n+=2 while(n<=i): print(n,end=‘‘) n+=1 print()kzkz(5)
1
212
32123
4321234
543212345
原文地址:https://www.cnblogs.com/kzkzkz/p/10344184.html
时间: 2024-11-05 22:38:19