Python 代码计算最大阶乘值不超过 10000 的 n
n = 1
factorial = 1
while factorial <= 10000:
n += 1
factorial *= n
print('n 的最大值为:', n-1)
原文地址: https://www.cveoy.top/t/topic/mJgQ 著作权归作者所有。请勿转载和采集!
安全问答是一个知识全球问答,包含丰富的问答知识
n = 1
factorial = 1
while factorial <= 10000:
n += 1
factorial *= n
print('n 的最大值为:', n-1)
原文地址: https://www.cveoy.top/t/topic/mJgQ 著作权归作者所有。请勿转载和采集!