1 def fact(n): 2 if n==1: 3 return 1 4 return n*fact(n-1) 5 6 n=int(raw_input("Please Input The Number of N: ")) 7 print fact(n)
时间: 2024-10-07 18:19:53
1 def fact(n): 2 if n==1: 3 return 1 4 return n*fact(n-1) 5 6 n=int(raw_input("Please Input The Number of N: ")) 7 print fact(n)