# 2017 AIME II Problems/Problem 14

## Problem

A $10\times10\times10$ grid of points consists of all points in space of the form $(i,j,k)$, where $i$, $j$, and $k$ are integers between $1$ and $10$, inclusive. Find the number of different lines that contain exactly $8$ of these points.

## Solution

The easiest way to see the case where the lines are not parallel to the faces, is that a line through the point $(a,b,c)$ must contain $(a \pm 1, b \pm 1, c \pm 1)$ on it as well, as otherwise the line would not pass through more than 5 points. This corresponds to the 4 diagonals of the cube.

We look at the one from $(0,0,0)$ to $(10,10,10)$. The lower endpoint of the desired lines must contain both a 0 and a 2 (if min > 0 then the point $(a-1,b-1,c-1)$ will also be on the line for example, 2 applies to the other end), so it can be $(0,0,2), (0,1,2), (0,2,2)$. Accounting for permutations this is 12 ways, so 12*4 = 48 for this case. The answer is, therefore, $120 + 48 = \boxed{168}$

The problems on this page are copyrighted by the Mathematical Association of America's American Mathematics Competitions. 