2017 AMC 10A Problems/Problem 23
How many triangles with positive area have all their vertices at points in the coordinate plane, where and are integers between and , inclusive?
There are a total of triangles. However, some of them are degenerate if or more points lie on the same line. There are a total of 12 lines that go through 5 points (5 vertical, 5 horizontal, 2 diagonal), 4 lines with slope that go through exactly 4 points, and 16 lines () with slope . Subtracting these degenerate triangles, we get an answer of .