Skip to content

Commit 41219a2

Browse files
committed
[BOJ] 이친수 / 실버 3 / 40분
https://www.acmicpc.net/problem/2193
1 parent a6257ba commit 41219a2

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import sys
2+
3+
input = sys.stdin.readline
4+
5+
n = int(input())
6+
7+
dp = [0] * (n + 1)
8+
dp[1] = 1
9+
10+
for i in range(2, n + 1):
11+
dp[i] = dp[i - 2] + dp[i - 1]
12+
13+
print(dp[n])

0 commit comments

Comments
 (0)