Skip to content

Commit

Permalink
solve : 11717 2xn 타일링 2
Browse files Browse the repository at this point in the history
  • Loading branch information
wwan13 committed Apr 26, 2024
1 parent 0d1d1ec commit b18cf0f
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions python/boj_11727.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import sys

input = sys.stdin.readline


def solution(n):
dp = [1, 3]
for i in range(len(dp), n):
dp.append(dp[i-1] + (2 * dp[i-2]))

return dp[n-1] % 10007


def display_result(answer):
print(answer)


def main():
n = int(input())
answer = solution(n)
display_result(answer)


main()

0 comments on commit b18cf0f

Please sign in to comment.