Skip to content

Commit

Permalink
2024-02-15
Browse files Browse the repository at this point in the history
  • Loading branch information
tgyuuAn committed Feb 15, 2024
1 parent af790fe commit 1ba4011
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tgyuuAn/DP/ํ”ผ๋ณด๋‚˜์น˜ ์ˆ˜ 3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
target = int(input())

M = 1_000_000
period = 1_500_000

target %= period

dp_table = [0 for _ in range(3)]
dp_table[0] = 0
dp_table[1] = 1

for idx in range(2,target+1):
idx %= 3
dp_table[idx] = dp_table[idx-1] % M + dp_table[idx-2] % M

print(dp_table[target%3]%M)
1 change: 1 addition & 0 deletions tgyuuAn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@
| 35์ฐจ์‹œ | 2023.01.25 | ์ด๋ถ„ ํƒ์ƒ‰ | <a href="https://www.acmicpc.net/problem/2110">๊ณต์œ ๊ธฐ ์„ค์น˜</a> | https://github.com/AlgoLeadMe/AlgoLeadMe-1/pull/120
| 36์ฐจ์‹œ | 2023.02.04 | BFS | <a href="https://www.acmicpc.net/problem/4991">๋กœ๋ด‡ ์ฒญ์†Œ๊ธฐ</a> | https://github.com/AlgoLeadMe/AlgoLeadMe-1/pull/126
| 37์ฐจ์‹œ | 2023.02.04 | BFS | <a href="https://www.acmicpc.net/problem/1039">๊ตํ™˜</a> | https://github.com/AlgoLeadMe/AlgoLeadMe-1/pull/131
| 38์ฐจ์‹œ | 2023.02.15 | DP | <a href="https://www.acmicpc.net/problem/2749">ํ”ผ๋ณด๋‚˜์น˜ ์ˆ˜ 3</a> | https://github.com/AlgoLeadMe/AlgoLeadMe-1/pull/137
---

0 comments on commit 1ba4011

Please sign in to comment.