Welcome to ZOJ
 Problem Sets Information Select Problem Runs Ranklist
ZOJ Problem Set - 3922
Candy with chocolate

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

Candy with chocolate Bob likes candies covered with chocolate. One day, Alice gave him a candy without chocolate, it's shaped as a convex regular polyhedron, with n faces, edge length e. Bob wants to cover it with a uniform coat of chocolate. The uniform coat of chocolate is h in thickness. Bob wants to know the volume of the chocolate he needs to do this.

#### Input

The first line is an integer T(1 ≤ T ≤ 1000), the number of cases.

There are 3 integers n, e, h in one line for each test case. (1 ≤ n, e, h ≤ 100)

#### Output

For each case, if it there can be a valid convex regular polyhedron corresponding to n, output the volume in a single line, otherwise, output 0. An answer with absolute error no larger than 1e-5 will be accepted. There're T lines in total.

```2
1 1 1
6 1 1
```

#### Sample Output

```0
19.613568
```

Author: YANG, Xinyu
Source: ZOJ Monthly, February 2016
Submit    Status