# 2019 AMC 10A Problems/Problem 10

## Problem

A rectangular floor that is $10$ feet wide and $17$ feet long is tiled with $170$ one-foot square tiles. A bug walks from one corner to the opposite corner in a straight line. Including the first and the last tile, how many tiles does the bug visit?

$\textbf{(A) } 17 \qquad\textbf{(B) } 25 \qquad\textbf{(C) } 26 \qquad\textbf{(D) } 27 \qquad\textbf{(E) } 28$

## Solution

The number of tiles the bug visits is equal to $1$ plus the number of times it crosses a horizontal or vertical line. As it must cross $16$ horizontal lines and $9$ vertical lines, it must be that the bug visits a total of $16+9+1 = \boxed{\textbf{(C) }26}$ squares.

Note: The general formula for this is $a+b-\gcd(a,b)$.

Edit: The general formula is that because it is the number of vert/horz lines crossed minus the number of corners crossed (b/c that would be double counting). In this particular problem, it was 16 + 9 - 1 (gcd of 16 and 9 is 1), which is 24, but then you add two because the first tile and the last tile are counted, which in the general formula are not counted.

## Solution 2 (Draw it out)

Draw it out using grid paper and a ruler. Carefully counting the squares gives us 26.