学校里没一个人会的问题,速求解答!!
Problem DescriptionZero recently bought a new bottle which is a circular truncated cone. He likes this bottle very much as this bottle is limited version. One day he wonder how high the water is after pouring some water into the bottle. Can you tell him the height of the water?
You are given the radius of the bottle's top and bottom circle. The bottle's height is also given.
Input
The first line contains an integer T which means the number of test cases.
Each test case contains four float point number: r, R, H, V(1<= r, R, H<=100; r<=R; 0<=V<=1000000000) within one line. ‘r’ indicates the bottom radius. ‘R’ indicates the top radius. ‘H’ indicates the height. ‘V’ indicates the volume of the water.
Output
For each case, just output one line containing one float point number which describes the height of the water. Note that you should round the number to six fractional digits.
Sample Input
1
100 100 100 3141562
Sample Output
99.999024