Skip to content

Commit 1a454b3

Browse files
committed
102차 1번 문제풀이(참고)
1 parent 93dca17 commit 1a454b3

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

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+
dp = [0] * 10001
7+
dp[1] = 1
8+
dp[2] = 3
9+
10+
for i in range(3, 10001):
11+
dp[i] = dp[i-2] * 2 + dp[i-1]
12+
13+
print(dp[n]%10007)

0 commit comments

Comments
 (0)