Created
April 15, 2018 09:34
-
-
Save qkreltms/b5ffb1cec1e2c5c9914404935faa2a39 to your computer and use it in GitHub Desktop.
2×n 타일링 2 - https://www.acmicpc.net/problem/11727
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def f(n): | |
| d = [0] * (n+1) | |
| d[0] = 1 | |
| d[1] = 1 | |
| for i in range(2, n+1): | |
| d[i] = d[i-1] + 2 * d[i-2] | |
| d[i] %= 10007 | |
| return d[n] | |
| print(f(int(input()))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment