Welcome to ZOJ
 Problem Sets Information Select Problem Runs Ranklist
ZOJ Problem Set - 3923
In the Rain

Time Limit: 1 Second      Memory Limit: 65536 KB      Special Judge

Fujiwara no Mokou was formerly an ordinary human, but she became an immortal being after drinking the Hourai Elixir about 1300 years ago. She has some sort of control over fire.

One day, Mokou was on the way home after cutting bamboo. Suddenly it began to rain. As a manipulator of fire, Mokou dislikes rains. So she ran to her home as quickly as possible.

We can regard Mokou as a cylinder. The path can be simplified as a line. Mokou started from (0, 0, 0) and her home is at (x0, 0, 0). It is supposed that the rain is continuous and its density is 1. The rain will be absorbed immediately when it touches the surface of the cylinder or the ground. You need to measure how much weight of rain was absorbed by Mokou during her way to home in the rain.

#### Input

There are multiple cases. The first line of the input contains an integer T (1 ≤ T ≤ 200) which indicates the number of cases. For each test case:
The first line contains four integers R, H, V, x0, the radius, height and speed of the cylinder and the location of Mokou's house.
The second line contains three integers dx, dy and dz, the speed of the rain.
All integers in input are no less than -1000 and no larger than 1000. Test data satisfy that R, H, V, x0 > 0, dz < 0.

#### Output

For each case, output the total weight of rain which was absorbed by Mokou. Absolute or relative error no more than 1E-6 will be accepted.

```2
1 1 1 1
0 0 -1
2 3 3 3
2 3 -3
```

#### Sample Output

```5.1415926536
75.6464437651
```

#### Reference

Author: ZHAO, Yueqi
Source: ZOJ Monthly, February 2016
Submit    Status