LEAF - Leaf


A leaf is inscribed in a square. Given the length of a side of the square. Find the area of the leaf.

A leaf is the intersection of two quarter circles drawn from two opposite ends of a square, with the radius being equal to the length of a side of the square.

Input

In the first line there will be an integer t (t ≤ 105) the number of testcases. Next t lines will contain a number a (0 ≤ a ≤ 106), the side length of the square.

Output

Print the area of the Leaf. Errors less than 10-6 will be ignored.

Example

Input:
2
1
2
Output: 0.5707963268
2.2831853072

hide comments
[Rampage] Blue.Mary: 2016-05-14 16:14:32

My IO:
1
1000000

Output:
570796326794.89661923132169163975

If the judge solution can't get .896619 after the floating point, then the judge solution must be wrong.

Even if Pi = 2 * acos(0), you can not assume (in C++) double pi = 2 * acos(double(0)). Even long double has precision problem.

Last edit: 2016-05-14 16:18:18
rezwanarefin: 2016-05-14 10:56:25

@abhi2296 use PI = 2*acos(0)

abhi2296: 2016-05-14 10:27:20

Id:16913391 Can u please check? Getting wrong answer
EDIT: AC!!!

Last edit: 2016-05-14 11:20:13
rezwanarefin: 2016-05-14 09:14:29

There is a very little tricky case... If you can't find it; you'll get RTE :P ... But If you can find this, don't post it here. :)
There is nothing wrong with the Judge Data. :)

Last edit: 2016-05-14 09:14:49
rezwanarefin: 2016-05-14 09:12:54

Python will get RTE... :P For a tricky case. :)

kapslocker: 2016-05-14 07:39:33

Shows runtime error, please check

[Rampage] Blue.Mary: 2016-05-14 05:34:11

To this kind of problem, the author should use a (self-constructed) judge "Ignore absolute or relative errors less than 10^-9".


Added by:Rezwan
Date:2016-05-13
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64 GOSU JS-MONKEY