문제
- 백준-11727 : 2 x n 타일링 2
- 문제링크
풀이
leng = int(input())
memo = [0]*(leng)
memo[0:2] = [1,3]
for i in range(2, leng):
memo[i] = memo[i-1]+2*memo[i-2]
print(memo[leng-1]%10007)
leng = int(input())
memo = [0]*(leng)
memo[0:2] = [1,3]
for i in range(2, leng):
memo[i] = memo[i-1]+2*memo[i-2]
print(memo[leng-1]%10007)