height × width cells has to be covered with square tiles. Each tile's side is a whole number of cells; tiles may be of any sizes, including different ones. Tiles must not overlap, stick out past the edge of the floor, or leave any gaps.
Return the smallest number of tiles that covers the whole floor.height=3, width=2 → 3
One 2×2 tile and two 1×1 tiles below it.
height=4, width=6 → 3
A 4×4 tile with two 2×2 tiles stacked next to it.
height=5, width=5 → 1
The floor is square, so a single 5×5 tile does it.
height=3, width=2
3
Run checks the first 3 tests in your browser. Submit checks all 60 tests on the server, hidden ones included.