반응형
https://www.acmicpc.net/problem/10870
# @Author YoungMinKim
# baekjoon
def fibonacci(N):
if N==0:
return 0
elif N==1:
return 1
else:
return fibonacci(N-2)+fibonacci(N-1)
N=int(input())
print(fibonacci(N))
반응형
'백준 문제풀이' 카테고리의 다른 글
baekjoon - python - 10872 (0) | 2020.09.02 |
---|---|
baekjoon - python - 10871 (0) | 2020.09.02 |
baekjoon - python - 10869 (0) | 2020.09.02 |
baekjoon - python - 10818 (0) | 2020.09.02 |
baekjoon - python - 10817 (0) | 2020.09.02 |
댓글