Circles Inside a Square
Time limit1sMemory limit1024 MB
Given the radius r of 8 equal circles, find the area of the smallest square that can hold them without overlap.
Problem
You have 8 circles of equal size and you want to pack them inside a square. You want to minimize the size of the square. The following figure shows the minimum way of packing 8 circles inside a square:

Given the radius , find the area of the smallest square into which 8 circles of that radius can be packed.
Input
The first line contains a positive integer , the number of test cases. Each test case is a single line containing a positive real number , the radius. is between 0.001 and 1000, inclusive.
Output
For each test case, output the area of the smallest square that can hold 8 circles of radius . Print 5 digits after the decimal point. Your answer is correct if it is within of the judge's answer.