# TODO a = eval(input()) b = eval(input()) c = 0 sum = 0 for i in range(a, b+1) : if i % 4 == 0 or i % 9 == 0: print('%-4d' %(i), end='') c = c + 1 sum = sum + i if c % 10 == 0: print() print() print(c) print(sum)
Category: Python
全新的繁體中文 WordPress 網站
# TODO a = eval(input()) b = eval(input()) c = 0 sum = 0 for i in range(a, b+1) : if i % 4 == 0 or i % 9 == 0: print('%-4d' %(i), end='') c = c + 1 sum = sum + i if c % 10 == 0: print() print() print(c) print(sum)