Skip to content

Commit

Permalink
[코딩테스트책] 8-3. 바닥공사 (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
heerucan committed Mar 6, 2022
1 parent 7f885cc commit 74cd2bb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Empty file.
10 changes: 10 additions & 0 deletions CodingTest/CH8 다이나믹 프로그래밍/바닥공사.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
n = int(input())

d = [0]*1001

d[1] = 1
d[2] = 3
for i in range(3,n+1):
d[i]=(d[i-1]+2*d[i-2])%796796

print(d[n])

0 comments on commit 74cd2bb

Please sign in to comment.