(In reply to
re: solution by Charlie)
... I left out 3:
A number ending in 3 will have powers with ending digits that cycle 3, 9, 7, 1 in a cycle of 4. As 99 is congruent to 3 mod 4, 3^99 ends in 7, the third in the cycle.
That makes one decade add up to 5 mod 10.

Posted by Charlie
on 20040123 10:22:38 