Files

11 lines
154 B
Python

#5.6.1
def f(n):
if n==0:
return 1
elif n>0:
return n*f(n-1)
else:
return "输入错误"
a = int(input())
print(f(a))