5 lines
99 B
Python
5 lines
99 B
Python
def factorial(n):
|
|
result = 1
|
|
for i in range(1, n+1):
|
|
result *= i
|
|
return result
|