Skip to content

Commit 83df97a

Browse files
committed
[PGS] #멀리뛰기/ Level 2 / 25분 / 성공
1 parent 62d7dfc commit 83df97a

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+
def solution(n):
2+
answer = 0
3+
4+
dp = [0] * 2001
5+
dp[1], dp[2] = 1, 2
6+
7+
for i in range(3, n+1):
8+
dp[i] += (dp[i-1] + dp[i-2]) % 1234567
9+
return dp[n]
10+
11+
# test code
12+
a = solution(1)
13+
print(a)

0 commit comments

Comments
 (0)