5. If $x_{1}, x_{2}, x_{3}, x_{4}, x_{5}$ are distinct positive odd numbers, and satisfy
$$
\begin{array}{l}
\left(2005-x_{1}\right)\left(2005-x_{2}\right)\left(2005-x_{3}\right) . \\
\left(2005-x_{4}\right)\left(2005-x_{5}\right)=24^{2},
\end{array}
$$

then the last digit of $x_{1}^{2}+x_{2}^{2}+x_{3}^{2}+x_{4}^{2}+x_{5}^{2}$ is ( ).
(A) 1
(B) 3
(C) 5
(D) 7
5.A.

Since $x_{1}, x_{2}, x_{3}, x_{4}, x_{5}$ are distinct positive odd numbers, the 5 factors on the left side of the given equation are distinct even numbers. And $24^{2}$ can be decomposed into the product of 5 distinct even numbers in only one unique form:
$$
24^{2}=2 \times(-2) \times 4 \times 6 \times(-6),
$$

Therefore, the 5 factors $\left(2005-x_{i}\right)(i=1,2,3,4,5)$ should be equal to $2, -2, 4, 6, -6$ respectively.
$$
\begin{array}{l}
\text { Hence }\left(2005-x_{1}\right)^{2}+\left(2005-x_{2}\right)^{2}+\left(2005-x_{3}\right)^{2}+ \\
\left(2005-x_{4}\right)^{2}+\left(2005-x_{5}\right)^{2} \\
= 2^{2}+(-2)^{2}+4^{2}+6^{2}+(-6)^{2}=96.
\end{array}
$$

Expanding the left side of the above equation, we have
$$
\begin{array}{l}
5 \times 2005^{2}-4010\left(x_{1}+x_{2}+x_{3}+x_{4}+x_{5}\right)+ \\
\left(x_{1}^{2}+x_{2}^{2}+x_{3}^{2}+x_{4}^{2}+x_{5}^{2}\right)=96, \\
\text { Hence } x_{1}^{2}+x_{2}^{2}+x_{3}^{2}+x_{4}^{2}+x_{5}^{2} \\
=96-5 \times 2005^{2}+4010\left(x_{1}+x_{2}+x_{3}+x_{4}+x_{5}\right) \\
=1(\bmod 10).
\end{array}
$$