2. If $z^{2}+z+1=0$, then the value of $z^{2005}$ is ( ).
(A) 1
(B) -1
(C) $\frac{1}{2} \pm \frac{\sqrt{3}}{2}$ i
(D) $-\frac{1}{2} \pm \frac{\sqrt{3}}{2} \mathrm{i}$
$$
\begin{array}{l}
\text { Since } z^{3}-1=(z-1)\left(z^{2}+z+1\right)=0, z^{3}=1 \text {, therefore, } \\
z^{2005}=\left(z^{3}\right)^{668} \cdot z=z . \\
\text { Then } z=\frac{-1 \pm \sqrt{4-1} \mathrm{i}}{2}=-\frac{1}{2} \pm \frac{\sqrt{3}}{2} \mathrm{i} .
\end{array}
$$