浙大版《Python 程序设计》题目集 第2章-11 求平方与倒数序列的部分和 (15分)

m,n = map(int,input().split())
s = sum([i**2+1/i for i in range(m,n+1)])
print('sum = {:.6f}'.format(s))

发布了33 篇原创文章 · 获赞 0 · 访问量 269

猜你喜欢

转载自blog.csdn.net/weixin_42229583/article/details/104573081