2017-08-15 23:43:36 +08:00

7 lines
117 B
Python

def factorial(n, multi=1):
if 1 == n:
return multi
else:
return factorial(n - 1, multi * n)