Dark Mode
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Given a rectangle of size n x m, find the minimum number of integer-sided squares that tile
Example 1:
Input: n = 2, m = 3 Output: 3 Explanation: 3 squares are necessary to cover the rectangle. 2
Input: n = 5, m = 8 Output: 5 Example 3:
Input: n = 11, m = 13 Output: 6
Constraints:
1 <= n <= 13 1 <= m <= 13