思维练习-5: 求1 到10 的阶乘之和

factorial = 1
total = 0
for i in range(1,11):
    factorial = factorial * i
    total = total + factorial
print(total)

猜你喜欢

转载自blog.csdn.net/Vicky_P/article/details/82463219
今日推荐