Type: Default 1000ms 256MiB

杯子

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

有一个圆台形状的水杯,已知他的上底和下底半径,以及总高度。然后告诉往里面倒的水的体积,那么你知道杯子里的水会有多高吗?(杯子是水平放置的)

注意导入的水的体积,可能会超过杯子容积

Format

Input

第一行是一个T表示输入数据的组数 每个测试数据有一行, 包括4个小数: r, R, H, V, 分别表示下底半径, 上底半径, 高度 和水的体积。 T<=20,1<=r,R,H<=100,0<=V<=1000,000,000, r<=R

Output

对于每个测试样例,输出水的高度。保留6位小数

Samples

1
100 100 100 3141562
99.999024

Limitation

1s, 1024KiB for each test case.

二分训练

Not Claimed
Status
Done
Problem
11
Open Since
2022-11-29 19:00
Deadline
2022-12-5 0:00
Extension
24 hour(s)