[백준]11726

buam·2021년 8월 10일
0

Dynamic Programming

목록 보기
2/4

문제

https://www.acmicpc.net/problem/11726

풀이

# Bottom-up
import sys

n = int(sys.stdin.readline().rstrip())
d = [0] * 1001
d[1] = 1
d[2] = 2

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

print(d[n] % 10007)
profile
운동하는 개발자

0개의 댓글

관련 채용 정보

Powered by GraphCDN, the GraphQL CDN