본문 바로가기
📚 Algorithm

[Python] 백준 5532번 방학숙제

by 뿌맘 2021. 7. 18.
반응형

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

 

5532번: 방학 숙제

한 줄에 하나씩 총 다섯 줄에 걸쳐 L, A, B, C, D가 주어진다. (2 ≤ L ≤ 40, 1 ≤ A, B ≤ 1000, 1 ≤ C, D ≤ 100) 항상 방학 숙제를 방학 기간내에 다 할 수 있는 경우만 입력으로 주어진다.

www.acmicpc.net

import math

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

print(L - max(math.ceil(A/C), math.ceil(B/D)))
반응형

댓글