10. Each side of a square is divided into $n$ parts. How many triangles can be drawn by taking these division points as vertices?
10. Discuss in two categories.
(1) Three vertices are on different sides of the square. Choose three sides from the four sides of the square so that the three vertices of the triangle are on them, there are $C_{4}^{3}=4$ ways. Then, choose one point from the $n-1$ points on each side, there are $(n-1)^{3}$ ways, so there are $4(n-1)^{3}$ such triangles.
(2) Two vertices are on one side of the square, and the third vertex is on another side. Choose two vertices of the triangle on one side, there are $C_{4}^{1}=4$ ways to choose this side, and there are $C_{n-1}^{2}$ ways to choose two points from the $n-1$ points on this side. Then, choose one of the remaining three sides, there are $C_{3}^{1}=3$ ways, and choose one point from the $n-1$ points on this side, there are $n-1$ ways, so there are $4 C_{n-1}^{2} \cdot 3(n-1)=6(n-1)^{2}(n-2)$ such triangles.
Therefore, the total number of triangles that meet the conditions is $2(n-1)^{2}(5 n-8)$.