Skip to content

Commit

Permalink
2024-04-06 피보나치 수 5
Browse files Browse the repository at this point in the history
  • Loading branch information
suhyun113 committed Apr 8, 2024
1 parent 874af29 commit 4b6cb2d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 9 additions & 0 deletions suhyun113/DP/4-suhyun113.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
memo = [0, 1]

n = int(input())
def fibo(n):
if n >= 2 and n >= len(memo):
memo.append(fibo(n-1)+fibo(n-2))
return memo[n]

print(fibo(n))
3 changes: 2 additions & 1 deletion suhyun113/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
|:----:|:---------:|:----:|:-----:|:----:|
| 1차시 | 2024.03.25 | 그리디 | [체육복](https://school.programmers.co.kr/learn/courses/30/lessons/42862) | [#2](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/2) |
| 2차시 | 2024.03.29 | 수학 | [소수 & 팰린드롬](https://www.acmicpc.net/problem/1747) | [#9](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/9) |
| 3차시 | 2024.04.02 | 그리디 | [거스름돈](https://www.acmicpc.net/problem/14916) | [#12](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/12) |
| 3차시 | 2024.04.02 | 그리디 | [거스름돈](https://www.acmicpc.net/problem/14916) | [#12](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/12) |
| 4차시 | 2024.04.06 | DP | [피보나치 수 5](https://www.acmicpc.net/problem/10870) | [#16](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/16) |

0 comments on commit 4b6cb2d

Please sign in to comment.