87 字
约 17 秒
8
高斯求和
2026-09-26
无标签

for i in range(5):
print('hello')
print(i)
print(list(range(10)))

高斯求和

result = 0
for i in range(101):
result += i
print(result)

1!+ 2! + 3!。。。。+n!

result2 = 0
for n in range(4):
# n = 10
if n>0:
result = 1
for i in range(n+1):
if i>0:
result *= i
print(result)
result2 += result
print(result2)

result2 = 0
n = 1
while n<=4:
result = 1
m = 1
while m<=n:
result *= m
m += 1
result2 += result
n += 1
print(result2)

高斯求和
https://www.clxhxhhr.top/posts/4480/
作者
clxstart
发布于
2026-09-26
许可协议
CC BY-NC-SA 4.0
评论
0 条
还没有评论,先写一条吧。