# Difference between revisions of "2017 AMC 10A Problems/Problem 23"

## Problem

How many triangles with positive area have all their vertices at points $(i,j)$ in the coordinate plane, where $i$ and $j$ are integers between $1$ and $5$, inclusive?

$\textbf{(A)}\ 2128 \qquad\textbf{(B)}\ 2148 \qquad\textbf{(C)}\ 2160 \qquad\textbf{(D)}\ 2200 \qquad\textbf{(E)}\ 2300$

## Solution 1

There are a total of $\binom{25}{3}=2300$ sets of three points. However, some of them form degenerate triangles (i.e., they have area of 0) if the three points are collinear. There are a total of 12 lines that go through 5 points (5 vertical, 5 horizontal, 2 diagonal), which contributes $\binom{5}{3} \cdot 12 = 120$ degenerate triangles, 4 lines that go through exactly 4 points, which contributes $\binom{4}{3} \cdot 4 = 16$ degenerate triangles, and 16 lines that go through exactly three points, which contributes $\binom{3}{3} \cdot 16 = 16$ degenerate triangles. Subtracting these degenerate triangles, we get an answer of $2300-120-16-16=2300-152=\boxed{\textbf{(B) }2148}$.

## Solution 2

We can find out that the least number of digits the number $N$ is $142$, with $141$ $9$'s