Tilt Cylinder

Time Limit: 2 Seconds
Memory Limit: 65536 KB
Special Judge

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`.

#### Input

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.

#### Output

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.

#### Sample Input

1.000000 1.000000 1.000000 0.000000
1.000000 1.000000 1.000000 90.000000
2 1 2 45.0

#### Sample Output

1.5707963
3.1415926
7.5769518

Author:

**FENG, Jingyi**
Source:

**ZOJ Monthly, November 2014**
Submit
Status