| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 1024 MB | 111 | 64 | 39 | 49.367% |
Consider packing widgets for shipping where widgets cannot be stacked upon each other (2D packing). Each widget has a 1x1 footprint and is 1 unit high.
Boxes are available in any $W$ by $H$ by 1 size such that $H/2 \leq W \leq 2H,ドル with $W$ and $H$ being integers. The company wants to minimize the amount of packing material that will be needed to fill empty squares in a box.
Given $N,ドル the number of widgets to be shipped, what is the smallest number of squares that will be left empty when those widgets are packed for shipping?
Input consists of one line containing an integer $N,ドル the number of widgets to be packed. 1ドル \leq N \leq 10^{16}$.
Print a single line containing an integer denoting the minimum number of empty squares.
47
1
523
2
10000000000001
6