# Difference between revisions of "2016 AMC 10B Problems/Problem 14"

## Problem

How many squares whose sides are parallel to the axes and whose vertices have coordinates that are integers lie entirely within the region bounded by the line $y=\pi x$, the line $y=-0.1$ and the line $x=5.1?$

$\textbf{(A)}\ 30 \qquad \textbf{(B)}\ 41 \qquad \textbf{(C)}\ 45 \qquad \textbf{(D)}\ 50 \qquad \textbf{(E)}\ 57$

## Solution 1

The region is a right triangle which contains the following lattice points: $(0,0); (1,0)-(1,3); (2,0)-(2,6); (3,0)-(3,9); (4,0)-(4,12); (5,0)-(5,15)$

$[asy]size(10cm); for(int i=0;i<6;++i)for(int j=0;j<=3*i;++j)dot((i,j)); draw((0,-1)--(0,16),EndArrow);draw((-1,0)--(6,0),EndArrow); draw((-.5,-pi/2)--(5.2,5.2*pi),gray);draw((-1,-.1)--(6,-.1)^^(5.1,-1)--(5.1,16),gray); [/asy]$

Squares $1\times 1$: Suppose that the top-right corner is $(x,y)$, with $2\le x\le 5$. Then to include all other corners, we need $1\le y\le 3(x-1)$. This produces $3+6+9+12=30$ squares.

Squares $2\times 2$: Here $3\le x\le 5$. To include all other corners, we need $2\le y\le 3(x-2)$. This produces $2+5+8=15$ squares.

Squares $3\times 3$: Similarly this produces $5$ squares.

No other squares will fit in the region. Therefore the answer is $\boxed{\textbf{(D) }50}$.

## Solution 2

The vertical line is just to the right of $x = 5$, the horizontal line is just under $y = 0$, and the sloped line will always be above the $y$ value of $3x$. This means they will always miss being on a coordinate with integer coordinates so you just have to count the number of squares to the left, above, and under these lines. After counting the number of 1x1, 2x2, 3x3, squares and getting 30, 15, and 5 respectively, and we end up with $\textbf{(D)}\ 50$

Solution by Wwang