Problem 1
Let and be positive integers with . In their decimal representations, the last three digits of are equal, respectively, to the last three digits of . Find and such that has its least value.
Step 4 of 8: Reduce the mod-125 part to an order condition
In plain words
1978^m is invertible mod 125, so it can be cancelled entirely from the congruence.
Detailed analysis
Since is invertible modulo , the mod- condition reduces directly to , independent of .