import sys
n = int(sys.stdin.readline())
a = []*n
a.append(0)
if n >= 1:
a.insert(1,1)
for i in range(2,n+1):
a.insert(i,a[i-1] + a[i-2])
print(a[n])
'개발 > Algorithm' 카테고리의 다른 글
[Python] 백준 1931번 회의실 배정 (0) | 2021.11.09 |
---|---|
[Python] 백준 2798번 블랙잭 (0) | 2021.11.08 |
[Python] 백준 10872번 팩토리얼 (0) | 2021.11.08 |
[Python] 백준 더하기 사이클 1110번 (0) | 2021.11.08 |
[Python] 백준 10992 별 찍기 (0) | 2021.11.07 |
댓글