收起
def jchs(n): s = 1 for i in range(1, n+1): s *= i return s n = eval(input("请输入一个整数:")) print(n, "的阶乘是:", jchs(n))
报告相同问题?