Welcome to ZOJ
Select Problem
ZOJ Problem Set - 4111
Square on the Plane

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

Consider a point $P(x_p, y_p)$ on the two-dimensional plane. Starting from $(a, 0)$, point $P$ moves along the circumference of the ellipse $\frac{x^2}{a^2} + \frac{y^2}{b^2} = 1$ with a uniform speed of 1 unit per second in counter-clockwise direction.

A moving square $S$, whose sides are parallel with the x-axis or the y-axis, takes $P$ as its center and changes its side length during its movement. Precisely speaking, the side length of $S$ is exactly $2|y_p|$.

What's the total area passed through by $S$ after point $P$ moving for $t$ seconds?


There are multiple test cases. The first line of the input is an integer $T$ (about $10^5$), indicating the number of test cases. For each test case:

The first and only line contains three real numbers $a, b, t$ ($1 \le \frac{a}{2} \le b \le a \le 100, 1 \le t \le 1000$) with at most six digits after the decimal point, indicating the length of the semi-major axis of the ellipse, the length of the semi-minor axis of the ellipse and the moving time in seconds.


For each test case output one line, indicating the total area passed through by the moving square. Your answer will be considered correct if and only if the absolute error or relative error of your answer is less than $10^{-6}$.

Sample Input

3 3 2
4 3 2

Sample Output


Author: JIN, Mengge
Source: The 16th Zhejiang Provincial Collegiate Programming Contest Sponsored by TuSimple
Submit    Status