#Lutece1315. Intersection
Intersection
Migrated from Lutece 1315 Intersection
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
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?
Input
There is an integer in the first line, indicates the number of test cases.
For each test, the only line contains two integers and , the radius of the sphere and the base radius of the cone.
Output
For each test, output the answer in one line, in decimals, round to 4 decimal places.
Samples
1
1 2
1.1578
Resources
The 14th UESTC Programming Contest Final