标签:入行 png alt .com div bsp inpu end 金字塔
code
row = int(input("请输入行数:")) num = 1 sum = 0 for i in range(1, row + 1): for j in range(row - i, 0, -1): print(" ", end="\t") for j in range(1, i + 1): print(num, end="\t") num *= 2 sum = num num = 1 sum //= 2 for j in range(2, i + 1): print(sum//2, end="\t") sum //= 2 print("")
标签:入行 png alt .com div bsp inpu end 金字塔
原文地址:https://www.cnblogs.com/sea-stream/p/10804991.html