← Back to List

5532번: 방학 숙제 ↗

Solutions

C++14
168 B | 168 chars
#include<iostream>
using namespace std;
int L,A,B,C,D;
int main()
{
    cin>>L>>A>>B>>C>>D;
    A=(A%C==0?A/C:A/C+1);
    B=(B%D==0?B/D:B/D+1);
    cout<<L-(A>B?A:B);
}