(rows, columns).a, with 1 <= a <= min(rows, columns).query = [4, 2]
1 x 1 squares: 4 * 2 = 8
2 x 2 squares: 3 * 1 = 3
return 8 + 3 = 11
rows = 4 columns = 2
11
| 0 | 1 | |
|---|---|---|
| 0 | · | · |
| 1 | · | · |
| 2 | · | · |
| 3 | · | · |
The input is a 4 row by 2 column grid.
The total is 11 because the grid contains 8 unit squares and 3 squares with side length 2.
rows = 4 columns = 2
11
| 0 | 1 | |
|---|---|---|
| 0 | · | · |
| 1 | · | · |
| 2 | · | · |
| 3 | · | · |
The input is a 4 row by 2 column grid.