n = int(input('请输入你想要求和的:')) sum = 0 for i in range(1,n+1): sum = sum + i print(sum)
蓝桥杯——序列和
最新推荐文章于 2024-08-16 16:00:00 发布
n = int(input('请输入你想要求和的:')) sum = 0 for i in range(1,n+1): sum = sum + i print(sum)