Python如何计算100的阶乘?

1 个回答|77 次阅读
Coco老师 - 科普专家
擅长:编程教育
n = 1
for i in range(1,101):
    n = n * i
print("100的阶乘是:",n)

执行结果是:

100的阶乘是: 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000