War

Time Limit: 5000ms
Memory Limit: 32768KB
This problem will be judged on HDU. Original ID: 5060
64-bit integer IO format: %I64d      Java class name: Main
Special Judge

Description

Long long ago there are two countrys in the universe. Each country haves its own manor in 3-dimension space. Country A's manor occupys x^2+y^2+z^2<=R^2. Country B's manor occupys x^2+y^2<=HR^2 && |z|<=HZ. There may be a war between them. The occurrence of a war have a certain probability.
We calculate the probability as follow steps.
1. VC=volume of insection manor of A and B.
2. VU=volume of union manor of A and B.
3. probability=VC/VU

Input

Multi test cases(about 1000000). Each case contain one line. The first line contains three integers R,HR,HZ. Process to end of file.

[Technical Specification]
0< R,HR,HZ<=100

Output

For each case,output the probability of the war which happens between A and B. The answer should accurate to six decimal places.

Sample Input

1 1 1
2 1 1

Sample Output

0.666667
0.187500

Source

Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .