def cheng (n): if n == 1: return 1 return cheng(n-1) * (n) num = int(input('请输入n:')) print(cheng(num))