Learn / Library / Brainteasers
Rectangles that are not squares
A board is cells tall and cells wide. Count the rectangles, of any size, whose sides lie along the grid lines and that are not squares.
Checking an answer needs JavaScript. The hint and the solution open without it.
Hint
Count all rectangles by choosing grid lines, then subtract the squares by side length.
Solution
- The board has horizontal and vertical grid lines, and a rectangle is fixed by choosing of each, so there are rectangles in all.
- A square of side has positions, for from to .
- That gives squares.
- The rectangles that are not squares number .
Answer: