|
||||||||||
The nearest fractionTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 905 Accepted Submission(s): 190 Problem Description Find the fraction closest to sqrt(N), the denominator of the fraction is no more than M. Input The input consists of multiple test cases.For each case the input contains two integers N and M, 1<=N<=1000000, 1<=M<=1000. Output For each case output one line, contaning the fraction that in the form "A/B" where A and B are positive integers with no common factors greater than one. Sample Input
Sample Output
Author 8600 | ||||||||||
|