#t283. 我的世界
我的世界
Building a Cuboid
Problem Background
Special for beginners, ^_^
Problem Description
Minecraft is an almost omnipotent sandbox game in which players can use various in-game resources to create and build their own world.
In Minecraft, the basic building block is a cube of side length . Tony wants to use such small cubes to build a cuboid, and decorate it with his treasured stickers. One sticker can cover exactly one face of a small cube. How many stickers will he need at minimum?
Input Format
One integer , the number of small cubes Tony owns. does not exceed .
Output Format
One integer: the minimum number of stickers Tony needs.
Sample Input
9
Sample Output
30
Constraints
Time limit: 1s, memory limit: 1024KiB for each test case.
Hint
To use the fewest stickers, the cuboid built from the cubes should have the smallest possible surface area — make its three dimensions as close to each other as possible.