
ZOJ Problem Set  2369
In this problem your task is very simple. Consider two infinite cylinders in threedimensional space, of radii R_{1} and R_{2} respectively, located in such a way that their axes intersect and are perpendicular. Your task is to find the volume of their intersection. This problem contains multiple test cases! The first line of a multiple input is an integer N, then a blank line followed by N input blocks. Each input block is in the format indicated in the problem description. There is a blank line between input blocks. The output format consists of N output blocks. There is a blank line between output blocks. Input Input file contains two real numbers R_{1} and R_{2} (1 <= R_{1},R_{2} <= 100). Output Output the volume of the intersection of the cylinders. Your answer must be accurate up to 10^{4}. Sample Input
1 Sample Output
5.3333 Author: Andrew Stankevich Source: Andrew Stankevich's Contest #3 