# TODO a = int(input()) i = 1 while i <= a: print('%4d' %(i), end='') sum = i j = 1 while j < i: sum = sum + i print('%4d' %(sum), end='') j = j + 1 i = i + 1 print()
Category: Python
全新的繁體中文 WordPress 網站
# TODO a = int(input()) i = 1 while i <= a: print('%4d' %(i), end='') sum = i j = 1 while j < i: sum = sum + i print('%4d' %(sum), end='') j = j + 1 i = i + 1 print()