Gigel is a young programmer. He has an impressive work speed: he can debug a C program in x minutes, and a Java program in y minutes.
Task
Knowing that he worked for N
minutes today, determine how many C and how many Java programs Gigel has debugged.
Because we know that Gigel prefers C, we have to choose the solution which has
a maximum number of C programs debugged.
Input Data
Input file programs.in contains
on the first line three positive integers, x
y N, with the meaning above.
Output Data
Output file programs.out will
contain a single line with two positive integers: the number of C and respectively
the number of Java programs debugged by Gigel, separated by a single space.
Restrictions
1 <= N <= 200 000 000 000 000 000
There is always a solution for test data.
Example
programs.in | programs.out |
10 6 104 | 8 4 |
Time limit: 0.1 seconds/test
Marinel Serban
"Gr. C. Moisil" Iaşi IT High School
marinel_serban@yahoo.com