A,B = map(int,input().split())
count = 0
for i in range(A,B+1):
if count == 5:
count=0
print()
print('{:>5d}'.format(i),end='')
count +=1
print()
print('Sum = %d' % sum(range(A,B+1)))
浙大版《Python 程序设计》题目集 第2章-14 求整数段和 (15分)
猜你喜欢
转载自blog.csdn.net/weixin_42229583/article/details/104573109
今日推荐
周排行