A rectangular 12 cm by 20 cm waffle is divided into 1 by 1 cm squares. An ant crawls along a straight path from one corner to the opposite corner. How many squares of the waffle does the ant cross through?
I tried to to use Pythagorean theorem but I don't think that would work. I think you could use PIE (Principle of Inclusion Exclusion) to solve this problem.
You can divide it into $\gcd (12,20)=4$ pieces. It crosses a $3 \times 5$ rectangle and arrives at the opposite corner. Draw it and count. You should be able to generalize to an $m \times n$ rectangle when $m$ and $n$ are coprime because it will not go through any interior lattice points.