Problem K
King of cans
As an informatics student, Lisa naturally has some tendencies of OCD and today it kicks in hard. She will not take any receipt not being exactly $100$ Norwegian kroner after recycling the soda. The question is this: what is the maximum amount of receipts equaling exactly $100$ Norwegian kroner Lisa can get?
Input
The first and only line have two space-separated integers $x$ and $y$, where $0 \leq x \leq 10^{4}$ is the number of bottles whose deposit worth is $2$ Norwegian kroner, and $0 \leq y \leq 10^{4}$ is the number of bottles whose deposit is worth $3$ Norwegian kroner.
Output
Your program should output a single integer, the maximum number of refund receipts Lisa can get which each total exactly $100$ Norwegian kroner.
Sample Input 1 | Sample Output 1 |
---|---|
5 30 |
1 |
Sample Input 2 | Sample Output 2 |
---|---|
49 1 |
0 |
Sample Input 3 | Sample Output 3 |
---|---|
0 100 |
0 |