2. Given that $m, n$ can each take one of $1,2, \cdots, 2009$. Then the number of pairs $(m, n)$ that make the equation $x^{2}-m x+n=0$ have real roots is ( ).
(A)676 211570
(B)676 211571
(C)676 211572
(D)676211578
2.A.

From the problem, we have
$$
\Delta=(-m)^{2}-4 n \geqslant 0 \text {, }
$$

which means $n \leqslant \frac{1}{4} m^{2}$.
(1) If $m$ is odd, let $m=2 k-1(k=1,2$, $\cdots, 1005$ ). Then
$$
n \leqslant \frac{1}{4}(2 k-1)^{2}=k^{2}-k+\frac{1}{4} \text {. }
$$

Thus, $n$ can take $1,2, \cdots, k^{2}-k$.
So $n$ can take $k^{2}-k$ integers.
(2) If $m$ is even, let $m=2 t(t=1,2, \cdots$, 1004 .. Then
$$
n \leqslant \frac{1}{4}(2 t)^{2}=t^{2} \text {. }
$$

Thus, $n$ can take $1,2, \cdots, t^{2}$.
So $n$ can take $t^{2}$ integers.
Therefore, the number of pairs $(m, n)$ is
$$
\begin{aligned}
{[} & \left.\left(1^{2}-1\right)+\left(2^{2}-2\right)+\cdots+\left(1000^{2}-1000\right)\right]+ \\
& \left(1^{2}+2^{2}+\cdots+1004^{2}\right) \\
= & 2\left(1^{2}+2^{2}+\cdots+1004^{2}\right)+1005^{2}-(1+2+\cdots+1005) \\
= & 2 \times \frac{1}{6} \times 1004(1004+1)(2 \times 1004+1)+ \\
& 1005^{2}-\frac{1}{2}(1+1005) \times 1005 \\
= & 676211570 .
\end{aligned}
$$