本站作为LDUOnlineJudge的测试版本进行演示,官方网站请访问http://icpc.ldu.edu.cn
[Hidden]

1230. A. Circles Inside a Square


Description

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 illustrates the minimum way of packing 8 circles inside a square:

The Problem:
Given the radius, r, find the area of the minimum square into which 8 circles of that radius can be packed.

Input

The first input line contains a positive integer, n, indicating the number of test cases. Each test case consists of a positive real number (between 0.001 and 1000, inclusive) in a single line denoting the radius, r.

Output

For each test case, output the area of the minimum square where 8 circles of radius r can be packed. Print 5 digits after the decimal. Your output is considered correct if it is within ±0.00001 of the judge’s output.

Samples

Input Copy
2
0.1
0.2
Output
0.34383
1.37532

Source

UCF2013
Problem Information

Time Limit: 1000MS (C/C++,Others×2)
Memory Limit: 128MB (C/C++,Others×2)
Special Judge: No
AC/Submit: 1 / 1
Tags:
Contests involved

1027. UCF 2013
My history solutions

You didn't submit any solution!
Submit your solution

Login Register