diff --git "a/xxubin04/DP/9095_1,2,3 \353\215\224\355\225\230\352\270\260.py" "b/xxubin04/DP/9095_1,2,3 \353\215\224\355\225\230\352\270\260.py" new file mode 100644 index 0000000..87a70e0 --- /dev/null +++ "b/xxubin04/DP/9095_1,2,3 \353\215\224\355\225\230\352\270\260.py" @@ -0,0 +1,14 @@ +input = open(0).readline + +def dp(value): + if value == 1: + return(1) + elif value == 2: + return(2) + elif value == 3: + return(4) + else: + return dp(value-3)+dp(value-2)+dp(value-1) + +for i in range(n := int(input())): + print(dp(int(input()))) \ No newline at end of file diff --git a/xxubin04/README.md b/xxubin04/README.md index b30d0f6..932808a 100644 --- a/xxubin04/README.md +++ b/xxubin04/README.md @@ -58,4 +58,5 @@ | 54차시 | 2024.07.11 | Tree | [1991]트리 순회 | https://github.com/AlgoLeadMe/AlgoLeadMe-3/pull/203 | | 55차시 | 2024.07.29 | 정렬 | [Programmers]H-Index | https://github.com/AlgoLeadMe/AlgoLeadMe-3/pull/208 | | 56차시 | 2024.08.05 | 구현 | [2018 KAKAO BLIND]뉴스 클러스터링 | https://github.com/AlgoLeadMe/AlgoLeadMe-3/pull/211 | -| 57차시 | 2024.08.08 | Hash | [2019 KAKAO BLIND]오픈채팅방 | https://github.com/AlgoLeadMe/AlgoLeadMe-3/pull/215 | \ No newline at end of file +| 57차시 | 2024.08.08 | Hash | [2019 KAKAO BLIND]오픈채팅방 | https://github.com/AlgoLeadMe/AlgoLeadMe-3/pull/215 | +| 58차시 | 2024.09.04 | DP | [9095]1,2,3 더하기 | https://github.com/AlgoLeadMe/AlgoLeadMe-3/pull/219 |