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