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

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

hide comments
2024-01-14 09:15:17
The test files should be fixed now. I set this problem when I had no idea about floating point numbers. ☹️
2024-01-07 09:18:22
After compiling with C++ (g++ 4.3.2), I got accepted.
2023-10-18 00:41:17
is 570796326794.8966064453 for case with a = 1000000 fixed?
2017-02-12 02:30:58
What is the point of telling us what PI is but not the shape of the leaf?
2016-11-18 19:48:53
@Rezwan Please check 18213086.Getting WA.Couldn't figure it out the reason.
2016-05-19 15:28:37 cosmopoliton
getting wa can you check the code the code gives the ans for 1000000 as 570796326794.896606445
2016-05-19 02:22:04 rainy jain
AC in one go. Use PI=acos(-1) and no unnecessary assumptions.

Last edit: 2016-05-19 02:23:05
2016-05-18 17:14:27 RIVU DAS
Getting WA. Can you check the code?
2016-05-16 20:21:16 wisfaq
The problem as is can't stay visible.
doubles have at most 15 or 16 significant digits correct.
That means that a=1000000 and 6 decimal places after the decimal point can never be correct using doubles.
So the problem must be hidden and moved out of classical
2016-05-16 19:28:52 Vindhyansh Mall
Do "In the first line there will be an integer t" means there will also be other non integer things in first line?
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.