5. Given $x=2007^{2008}$. Then the remainder when $x$ is divided by 10 is ( ).
(A) 1
(B) 3
(C) 7
(D) 9
5.A.
$x$ divided by 10 has the same remainder as $7^{2008}$ divided by 10. The remainders of $7,7^{2}, 7^{3}, 7^{4}, 7^{5}, \cdots$ when divided by 10 are $7,9,3,1,7, \cdots$. They repeat with a period of 4.

Since $2008=502 \times 4$, the remainder of $7^{2008}$ divided by 10 is 1, which means the remainder of $x$ divided by 10 is 1.