A rectangle is divided into six columns and four rows of equal square cells. Draw the straight diagonal from its lower-left outer corner to its upper-right outer corner. Count cells containing a positive-length part of the diagonal, excluding cells that only touch it at a single corner. This original grid exercise makes the counting convention explicit so that crossings at interior grid vertices are treated consistently.
Need help choosing a next step? Scan the contact QR code below or contact Hanlin on WeChat. Send KANGAROO-S5-1127 and tell us your school year and question.
Start with the cells entered rather than all nearby cells
The diagonal begins inside the first cell and moves through the rectangle. Whenever it crosses one ordinary interior grid line, it enters one new cell. Merely sharing a point with the diagonal at a corner does not count under the stated rule. The task is not to count every square whose closed boundary has any contact with the line.
Count vertical and horizontal interior boundaries
There are five interior vertical grid lines and three interior horizontal grid lines. If all eight crossings occurred at separate locations, the diagonal would pass through nine cells, including its first cell. But this diagonal passes through an interior grid vertex, so two of those boundary events occur at the same location and cannot be counted as two new cells.
Locate the simultaneous crossing
The diagonal has slope four sixths, or two thirds. At horizontal coordinate three cell widths, it reaches height two cell widths, an interior grid vertex. At that point it leaves one cell and enters the diagonally opposite cell. The two cells touching only at that corner are excluded, so this combined event adds one cell, not two.
Apply the corrected count
The separate-crossing count nine must be reduced by one, giving eight cells. Equivalently, for an m-by-n rectangle the count is m plus n minus their greatest common divisor. Here the divisor is two, so six plus four minus two is eight. The correction is tied to the interior lattice vertices actually encountered, not to the visual length of the diagonal.
Explain the greatest-common-divisor term
A corner-to-corner diagonal passes through gcd(m,n) minus one interior grid vertices. Each joins a vertical and horizontal crossing into one event. Thus one plus m minus one plus n minus one, minus gcd minus one, simplifies to m plus n minus gcd. For six columns and five rows the divisor is one and the count is ten, with no interior vertex correction.
Check simple boundaries and the counting convention
A square with equal row and column counts follows cell corners and crosses only that many diagonal cells, consistent with the formula. Counting corner touches instead would produce another answer and needs another rule. Official Math Kangaroo resources are linked for separate practice. This independently written explanation is not an official item and does not treat a line drawing as permission to ignore shared crossing events.
Continue reading: Math Kangaroo Counting: A Draw Removes One Point from a League Total.
Contact Hanlin
Planning a first attempt or reviewing a topic you find difficult? Scan the QR code and send KANGAROO-S5-1127. Include your school year, country or competition region, experience and the question you want to discuss.

On your phone, use the button or save the QR image and scan it within WeChat.
Official information and further reading: Source 1
