NTHSUM - Xavier’s Fight

Professor X has declared a fight against Magneto. He is gathering all his X-Men. But he doesn’t want to risk anyone’s life. That’s why rather than sending alone, he has decided to send each one of them in a group of 3 members. To select a group he is following a simple rule. A group will consist of 3 members with same unit of power. The total power of each group will be the product of all of their powers.

Now there are 3*N X-Men. Power of all the members of ith (1 <= i <= N) group is i.

Given N, our task is to determine what will be sum of powers for all group. Sum can be very large that’s why you need to print the square root of sum.

Input

First line of input is T (1 <= T <= 10000). Next T lines will contain an integer N (1 <= N <= 1000000000).

Output

For each case there will be a single number which is the square root for sum of N groups’ total power. Output should be rounded to 3 digits after decimal point.

Example

Input:
1
2

Output:
3.000

Added by:imranziad
Date:2016-11-23
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64 GOSU
Resource:AIUB CS Fest 2016 - College Programming Contest

hide comments
2016-11-24 11:12:56 Francky
Is the judge : 2. Ignore FP errors 1e-3 ?
It should be used, and noticed for psolvers on every problems involving floats as output. Thanks.
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.