You are required to find the closest fraction f for a given number 0 ≤ d ≤ 1 such that both nominator and denominator of f are between 0 and 10000. If tie, choose f with minimum value. If still have many solutions, choose one with minimum denominator.
The input will consist of a series of decimal number 0 ≤ d ≤ 1 with 5 decimal places.
Output a closest fraction according to problem description.
0.00000 1.00000 0.30103
0/1 1/1 2718/9029