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.



81 人解决,84 人已尝试。

90 份提交通过,共有 134 份提交。

2.1 EMB 奖励。

创建: 10 年,2 月前.

修改: 3 年,3 月前.

最后提交: 3 天,16 小时前.

来源: Ukrainian