In the 2014 AIME 1, number 8 says:
The positive integers $N$ and $N^2$ both end in the same sequence of four digits $abcd$ when written in base 10, where digit $a$ is not zero. Find the three-digit number $abc$.
I solved this problem using modular arithmetic and a little bit of logic (mainly the realization that if $N^2 - N$ is congruent to $0 \pmod{10000}$ then either $N$ is divisible by $2^4$ and $N-1$ is divisible by $5^4$ or vice versa.)
I saw a solution that used the Chinese remainder theorem, something I've never seen before. How does this theorem work, and how would it apply to this problem?