Skip to content

Commit 2fef2b3

Browse files
committed
[BOJ] 팩토리얼 2 / 브론즈5 / 5분
https://www.acmicpc.net/problem/27433
1 parent a4ea807 commit 2fef2b3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import sys
2+
3+
def factorial(n):
4+
if n == 0 or n == 1:
5+
return 1
6+
return n * factorial(n-1)
7+
8+
inp = sys.stdin.readline
9+
10+
n = int(inp())
11+
12+
print(factorial(n))

0 commit comments

Comments
 (0)