We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 93dca17 commit 1a454b3Copy full SHA for 1a454b3
1 file changed
live10/test102/문제1/박희경.py
@@ -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