본문 바로가기

학습 노트/알고리즘 (Python)

99클럽 - 방학 숙제

https://www.acmicpc.net/problem/5532

아이디어

풀이

L = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())

days_for_korean = (A + C - 1) // C
days_for_math = (B + D - 1) // D

total_homework_days = max(days_for_korean, days_for_math)

play_days = L - total_homework_days

print(play_days)