Find an integer $0\leq n<1000$ such that the last three digits of $n^{267}$ are $321$.
I have tried this method:
$n^{267}\equiv 321(\text{ mod }1000)$
So, I break it up into two congruences and thought to apply the Chinese remainder theorem.
$n^{267}\equiv n^3\equiv321\equiv 1(\text{ mod }8)$
$n^{267}\equiv n^{67}\equiv321\equiv 71(\text{ mod }125)$
But it's very hard to solve the above congruences. Therefore, I do suspect that there is another method to solve the above congruence. Please help