Problem Statement | |||||||||||||
Santa Claus has n small boxes, all of equal size, containing presents for the children. Each box is a A x A x A cube. Santa wants to pack all of the small boxes into a large rectangular box with dimensions length x width x height. Each small box must be placed inside the big box with its sides parallel to the sides of the big box. Return the maximal possible value of A that will allow Santa Claus to fit all of the small boxes into the big one. Note that A is not necessarily an integer. | |||||||||||||
Definition | |||||||||||||
| |||||||||||||
Notes | |||||||||||||
- | The returned value must be accurate to within a relative or absolute value of 1E-9. | ||||||||||||
Constraints | |||||||||||||
- | n will be between 1 and 1,000,000,000, inclusive. | ||||||||||||
- | length, width and height will be between 1 and 1,000,000,000, inclusive. | ||||||||||||
Examples | |||||||||||||
0) | |||||||||||||
| |||||||||||||
1) | |||||||||||||
| |||||||||||||
2) | |||||||||||||
| |||||||||||||
3) | |||||||||||||
|