JDCC '17 Contest 2 J2 - Saving Paper

View as PDF

Submit solution

Points: 3 (partial)
Time limit: 1.0s
Memory limit: 64M

Problem type

After calculating how much wrapping paper she would need to wrap all the presents, Diana was astounded to learn that the wrapping paper would cost more than the presents themselves!

She realizes that by changing the dimensions of a box, she could use a lot less wrapping paper without changing the volume. Given the volume of one of her current boxes, can you figure out the minimum amount of wrapping paper that Diana would need to wrap a box with the same volume but possibly different dimensions?


The input consists of a single integer \(N\ (1 \le N \le 2\ 000)\), the volume of a box in cubic centimetres.


Output the minimum number of square centimetres of wrapping paper she needs to wrap the present. Note that she can only use integer dimensions for her boxes.

Sample Input 1


Sample Output 1


Sample Input 2


Sample Output 2



There are no comments at the moment.