2824. Box

单点时限: 2.0 sec

内存限制: 256 MB

A confectionery needs to make boxes for chocolates from square cardboard sheets of size aa. This box should be opened from the top and have square base. Box is made in two steps. At the first step square pieces of size bb get cut at all corners of the cardboard sheet. At the second step rectangular pieces get bent along the edges by the angle of 90 degrees to form the box. Having length of cardboard sheet‘s side a you need to find height b of the box when its volume is maximal.


The first line of input contains one integer n (1≤n≤10) - number of tests. Each of subsequent n lines contains one real number – length of cardboard sheet‘s side a (1≤a≤1014) for the test.


Output should contain n lines, each line should contain optimal height b for the corresponding test rounded to 10 digits after dot.



88 人解决,92 人已尝试。

98 份提交通过,共有 145 份提交。

2.0 EMB 奖励。

创建: 12 年,8 月前.

修改: 5 年,9 月前.

最后提交: 3 月前.

来源: Ukrainian