#P2406. 最小和
最小和
Description
Given that are positive integers with .
Find that satisfy the conditions and minimize .
Conditions:
- ;
- ;
- .
Input Format
Multiple test cases, terminated by EOF.
There are at most lines, each containing two numbers .
Output Format
Output the same number of lines as in the input. For each line, output two numbers , separated by a single space.
3 60
12 15
200 20000
300 30000
400 40000
800 5000
1200 7500
1600 10000
Hint
.
Terminated by EOF; there is no line count , and the first line is testdata.
The testdata are randomly generated.
Translated by ChatGPT 5
京公网安备 11011102002149号