#P6784. 「EZEC-3」造房子
「EZEC-3」造房子
Background
pigstd is going to build a house.
Problem Description
pigstd has units of material A and units of material B. Building the -th floor requires units of material A and units of material B.
However, pigstd thinks the house is not tall enough, so he takes out dollars. Each dollar can be used to buy unit of material A or unit of material B.
Now pigstd wants to know the maximum number of floors he can build.
Input Format
The first line contains three integers .
Output Format
Output one integer per line, representing the maximum number of floors pigstd can build.
1 2 3
2
1 5 3
2
Hint
[Sample 1 Explanation]
After pigstd buys units of material A and unit of material B, he will have units of material A and units of material B, so he can build at most a -floor house.
(It costs units of material A and units of material B.)
[Sample 2 Explanation]
After pigstd buys units of material A, he will have units of material A and units of material B, so he can build at most a -floor house.
(It costs units of material A and units of material B.)
[Constraints]
For of the testdata, .
| Test Point ID | Conditions Satisfied |
|---|---|
Translated by ChatGPT 5