Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Inscribed Hexagon

By Shibli_sesh · Limits 1s, 512 MB

Given a side of the largest regular hexagon that is inscribed in a circle. Find the area inside the circle excluding the hexagon.

A Regular hexagon is a hexagon with equal sides. In the above picture side AB = BC = CD = DE = EF = FA

Note that, Value of π (PI) = acos(-1)).

Input

The first line of the input consists of one integer T (1 <= T <= 100). Then T lines will follow. Each line will consist only one integer A (1 <= A <= 10000), the length of a side of the largest regular hexagon that can be inscribed in a circle.

Output

The output consists of only one value, the area inside the circle excluding the hexagon. Print the answer up to 5 decimal places.

Sample

InputOutput
5
1
10
100
1000
10000
0.54352
54.35164
5435.16442
543516.44224
54351644.22365

    Discussion

    Statistics


    97% Solution Ratio

    YouKnowWhoEarliest, 1M ago

    YouKnowWhoFastest, 0.0s

    edge555Lightest, 0 B

    steinumShortest, 223B

    Submit

    Login to submit