(12) $n$ football teams participate in a round-robin tournament, where each pair of teams plays one match. The winning team gets 2 points, the losing team gets 0 points, and in the case of a draw, both teams get 1 point. Three referees each calculated the total points of all teams, resulting in three different totals: 3,086, 2,018, and 1,238. They then calculated the average of each pair of these numbers, finding that the results were still different. They further calculated the average of the initial three numbers. If one of these seven numbers is correct, then the number of participating teams $n=$ $\qquad$ teams.
(12) Since
$$
\begin{array}{l}
\frac{3086+1238}{2}=2162, \\
\frac{3086+2018}{2}=2552, \\
\frac{1238+2018}{2}=1628, \\
\frac{3086+2018+1238}{3}=2114,
\end{array}
$$
$n$ teams played a total of $\frac{n(n-1)}{2}$ matches, with each match accumulating 2 points, resulting in a total of $n(n-1)$ points. Since the last digit of the product of two consecutive positive integers can only be $0, 2, 6$, 2018, 1238, 1628, and 2114 are all excluded. From $n(n-1)=2162$, we get $n=47$; from $n(n-1)=3086$, since $56 \times 55=3080, 57 \times 56=3192$, we get $56<n<57$, which means there is no integer solution at this time; if $n(n-1)=2552$, since $50 \times 51=2550, 51 \times 52=2652$, we have $51<n<52$, which also has no integer solution. Therefore, only $n=47$.