Time Limit: 2 Seconds
Memory Limit: 65536 KB
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: there is one line containing 4 float-point numbers: R, H, h and α (0 <= α <= 90, 1 <= R, H, h <= 100).
The test cases are reasonable, which means it wouldn't happen α = 90 and H < h such situations.
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.