| ps | |
|---|---|
| 링크 | acmicpc.net/… |
| 출처 | BOJ |
| 문제 번호 | 1424 |
| 문제명 | 새 앨범 |
| 레벨 | 골드 2 |
| 분류 |
애드혹 |
| 시간복잡도 | O(1) |
| 사용한 언어 | Python 3.11 |
| 제출기록 | 30616KB / 40ms |
| 최고기록 | 40ms |
| 해결날짜 | 2022/12/18 |
"""Solution code for "BOJ 1424. 새 앨범".
- Problem link: https://www.acmicpc.net/problem/1424
- Solution link: http://www.teferi.net/ps/problems/boj/1424
"""
def main():
N = int(input())
L = int(input())
C = int(input())
song_count_per_cd = (C + 1) // (L + 1)
song_count_per_cd = min(song_count_per_cd, N)
if song_count_per_cd % 13 == 0:
song_count_per_cd -= 1
q, r = divmod(N, song_count_per_cd)
if r == 0:
answer = q
elif r % 13 == 0 and song_count_per_cd == r + 1:
answer = q + 2
else:
answer = q + 1
print(answer)
if __name__ == '__main__':
main()