8. (1990 Chinese National Training Team Question) Find all positive integers $M$ less than 10 such that 5 divides $1989^{M}+M^{1889}$.
8. Since $1989^{M} \equiv(-1)^{M}(\bmod 5)$. If $M=5$, then $M^{1989} \equiv 0(\bmod 5), 1989^{M} \equiv-1(\bmod 5), 5 \times\left(1989^{M}+M^{989}\right)$, so $M \neq 5$. Now assume $M \neq 5,1 \leqslant M \leqslant 9$, then $(M, 5)=1$ and 5 is a prime. By Fermat's Little Theorem, we have $M^{4} \equiv 1 (\bmod 5), M^{5} \equiv M$. Thus, $M^{1999}=\left(M^{4}\right)^{497} \cdot M^{5} \equiv M(\bmod 5)$, and from $1989^{M}+M^{1989} \equiv(-1)^{M}+M \equiv 0 (\bmod 5)$, and $1 \leqslant M \leqslant 9$, we get $M=1$ or $M=4$.