Math Question Last 5 digits Find the last five digits of the number $5^{1981}$
I know that the last three digits are $125$ because the last three digits tends to be $125$ or $625$. Since $1981$ is odd, the last three digits are $125$. But how do I find the last five digits?

Per @lulu's comment, to find $5^{1981} \operatorname{mod} 10^5$, it suffices to find $5^{1981} \operatorname{mod} 2^5$ and $5^{1981} \operatorname{mod} 5^5$.  The latter is obviously 0, so it suffices to work out the former.
Let's try repeated squaring.

*

*$5^{1} \operatorname{mod} 32 = 5$

*$5^{2} \operatorname{mod} 32 = 25$

*$5^{4} \operatorname{mod} 32 = 25^2 \operatorname{mod} 32 = 17$

*$5^{8} \operatorname{mod} 32 = 17^2 \operatorname{mod} 32 = 1$
And this is enough to work out $5^{1981} = (5^8)^{247} \times 5^4 \times 5 = 1 \times 17 \times 5 = 21$ (modulo 32).
So now we need a number that's simultaneously equal to 0 modulo $5^5 = 3125$ (i.e., is a multiple of 3125) and equal to 21 modulo 32.  And we don't have to look far, because it turns out that 3125 itself meets that condition.
Therefore, the last 5 digits of $5^{1981}$ are 03125.
