Math Gold Medalist

Lor

2024 AMC 8 

Problem 23

Rodrigo is drawing lines on the coordinate plane, and counting how many unit squares they go through. He draws a line with endpoints $(2000,3000)$ and $(5000,8000).$ How many unit squares does this segment go through?

$\textbf{(A) }6000\qquad\textbf{(B) }6500\qquad\textbf{(C) }7000\qquad\textbf{(D) }7500\qquad\textbf{(E) }8000$

Intersections of the Diagonal in a Grid

Famous form of m and n in terms of gcd

Diagonal in a grid (m * n) passes through m+n-gcd(m,n) cells

   Solution