2024 AMC 8 · Question 23
Problem outline
On a unit square grid, draw the segment joining to . How many distinct squares have an interior point on the segment? Touching only a corner does not count.
Show answer and methods 2 methods
Answer
C. squares.
Method 1 Correct for double-counted crossings
The horizontal displacement is and the vertical displacement is . Start in one cell. Before the endpoint there are vertical and horizontal line crossings. Each crossing enters one new cell, except that simultaneous vertical and horizontal crossings must be counted as one event.
The displacement is and are coprime, so the intermediate multiples of are exactly the simultaneous crossings. The count is .
Method 2 Inspect a three-column pattern
Shift the start to the origin. Subtracting its coordinates from those of the end gives . After three columns the height has increased by exactly five units, so the same pattern repeats times.
In the first three columns the heights at the boundaries are . The segment passes through the interiors of two cells in the first column, three in the second, and two in the third. Distinct column groups share no cell interiors; hence .
Source and attribution
The outline and worked methods on this page were prepared for DR.WANG Mathematics.
Original question (external)