For each input fraction , you have to print out a line
containing the values
and
nearest to
in
, where
. Print out
,
,
and
as four integers, in
that order, on a single line, separated by spaces. Thus, your output
will consist of M lines overall, each containing 4 integers.
The correct output for the earlier sample input is shown below.
1 51 1 50 41 61 39 58 |
Note: Your program should not print anything other than these M lines, each consisting of 4 numbers. Please remove all diagnostic print statements before making your final submission. A program with extraneous output will be treated as incorrect!