Paint2D
Medium
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
You can "select", "copy", "insert" and "move" in another place a figures on the screen of the graphic editor Paint2D.
You have on the screen portrayal of individual square. What the least quantity of these operations you have to do for building of another rectangle, which size is A
xB
. The rectangle broke on the squares like individual square. (A
is width, B
is height).
Input
Two numbers A
and B
. A
, B
– is natural numbers, no more than 1000.
Output
Minimal quantity of operations.
Examples
Input #1
Answer #1
Submissions 8K
Acceptance rate 14%