Submit solution
Points:
7 (partial)
Time limit:
1.0s
Java
2.0s
Python
3.0s
Memory limit:
256M
Author:
Problem type
Leon is using a very powerful calculator.
Leon likes to play with calculators whenever he gets bored in class. Such fascinating devices! One day, an intriguing problem occurred to him:
If the equation contains number of 's, then given the values of and , what is the approximate value of ?
Leon is tasked with queries regarding this problem. Apparently, he didn't perform these countless calculator computations well enough.
Can you help him?
Input Specification
The first line contains integer , the number of queries.
The following lines each contain two space-separated integers and .
Output Specification
For each query, output the approximate value of on its own line, accurate within an absolute error of .
For of the points, may be accurate within an absolute error of .
Sample Input
3
100 2
50 14
3 16
Sample Output
1.414213562
1.4484039
1.99999
Comments
how do we get the first answer