Time Limit: 1000/1000MS (Java/Others) Memory Limit: 262144/262144KB (Java/Others)
Consider such a simple math problem:
There is a sphere and a right circular cone. The center of the sphere coincide with the apex of cone, and the height of the cone is equal to the
radius of the sphere.
Could you tell me the volume of the intersection of cone and sphere?
There is an integer T in
the first line, indicates the number of test cases.
For each test, the only line contains two integers r1 and r2,
the radius of the sphere and the base radius of the cone.
For each test, output the answer in one line, in decimals, round to 4 decimal places.