Programming/Python & Data Structures
[Baekjoon/Python3] 5532번 방학 숙제
HooNeee
2020. 12. 5. 21:22
[Baekjoon/Python3] 5532번 방학 숙제
5532번: 방학 숙제
한 줄에 하나씩 총 다섯 줄에 걸쳐 L, A, B, C, D가 주어진다. (2 ≤ L ≤ 40, 1 ≤ A, B ≤ 1000, 1 ≤ C, D ≤ 100) 항상 방학 숙제를 방학 기간내에 다 할 수 있는 경우만 입력으로 주어진다.
www.acmicpc.net
import math
nums = [int(input()) for i in range(5)]
l = nums[0] - max(math.ceil(nums[1] / nums[3]), math.ceil(nums[2] / nums[4]))
print(l)