Python 阶乘函数实现:从键盘输入获取正整数并计算阶乘
def factorial(x): s = 1 for i in range(1, x+1): s *= i return s
n = int(input()) print(factorial(n))
原文地址: https://www.cveoy.top/t/topic/owLN 著作权归作者所有。请勿转载和采集!
安全问答是一个知识全球问答,包含丰富的问答知识
def factorial(x): s = 1 for i in range(1, x+1): s *= i return s
n = int(input()) print(factorial(n))
原文地址: https://www.cveoy.top/t/topic/owLN 著作权归作者所有。请勿转载和采集!