Kkung wants to make a gift box for his future girlfriend out of a square panel of size a×a. The box must have a square base and an open top. It is made in two steps:
The resulting box has a square base of side a−2b and height b, so its volume is V(b)=b(a−2b)2.
Find the height b that maximizes the volume V(b).
The first line contains the number of test cases n (1≤n≤10). Each of the next n lines contains one real number a (1≤a≤1024), the side length of a panel.
For each test case, print the value of b that maximizes the volume, rounded to 10 digits after the decimal point, one per line.
If you still have time after solving this, please help Kkung find a girlfriend too.