137 - ZOJ Monthly, November 2014 - C
Given a closed right cylinder water tank and its radius is R and its height is H, and there is V(unknown) volume of water in it. Now the cylinder is α degrees inclined and the height of the water is h. Please note that the tank has a lid so the water will not flow out through the top. Your task is to calculate V.
There are multiple test cases.
For each test case output one line: V, the volume of the water. Any solution with a relative or absolute error of at most 1e-6 will be accepted.
1.000000 1.000000 1.000000 0.000000 1.000000 1.000000 1.000000 90.000000 2 1 2 45.0
1.5707963 3.1415926 7.5769518
Author: FENG, Jingyi