Pizza Party
Statement
Goal
John is opening a new restaurant called Pizza Galore. For his restaurant, he needs to order some custom-made pizza trays from Diamond Corp to carry the pizza boxes. John needs some help in figuring out the correct size for the pizza trays. The thing is Diamond Corp only manufactures square trays, and they need to know the length s in order to process an order. All pizza boxes are squares of side b and they are not allowed to be stacked on top of each other.If John has to carry n pizza boxes of side b, what is the length s of the tray?
For example, a 16x16 tray (s=16 inches) can only carry 1 pizza box of size 16x16, while a 32x32 tray can fit up to 4, and a 48x48 up to 9.
Input
Line 1: An integer n for the number of pizzas
Line 2: A integer b that defines the length of side of each pizza box
Line 2: A integer b that defines the length of side of each pizza box
Output
An integer s for the length of the side of the square tray
Constraints
0 < n <= 1*10^13
0 < r <= 1*10^12
0 < s <= 1*10^17
0 < r <= 1*10^12
0 < s <= 1*10^17
Example
Input
1 8
Output
8
Game modes
Fastest, Shortest
Test cases
Simple Test
Input
1
8
Output
8
Simple Validator
Input
1
4
Output
4
Very Easy Test
Input
2
8
Output
16
Very Easy Validator
Input
2
4
Output
8
Easy Test
Input
3
2
Output
4
Easy Validator
Input
3
4
Output
8
Simple Full Capacity Test
Input
4
2
Output
4
Simple Full Capacity Validator
Input
4
4
Output
8
Medium Test
Input
12
49
Output
196
Medium Validator
Input
16
49
Output
196
Difficult Test
Input
570
120
Output
2880
Difficult Validator
Input
700
120
Output
3240
Insane Test
Input
9879777
9999
Output
31436856
Insane Validator
Input
98797775
9999
Output
99390060
Impossible Test
Input
126781000230
84251512000
Output
29998930368768000
Impossible Validator
Input
1235640002300
9325151200
Output
10365782123012800
Solution language
Solution
Stub generator input