Problem - 4241
Compute $3^{2017}\pmod{1000}$.
This is equivalent to finding the least non-negative integer $x$ satifying $$\left\{ \begin{array}{llll} x & \equiv 3^{2017} &\equiv 3 & \pmod{8} \\ x & \equiv 3^{2017} &\equiv 38 &\pmod{125} \end{array} \right. $$
Applying CRT: $$\begin{array}{llll} 125^{-1} &\equiv 125^{\varphi(8)-1} &\equiv 5 &\pmod{8}\\ 8^{-1} &\equiv 8^{\varphi(125)-1} &\equiv 47 &\pmod{125} \end{array}$$
$$\therefore x\equiv 3\times 125 \times 5 + 38\times 8\times47\equiv \boxed{163}\pmod{1000} $$