Meowth 寫到:extract 5^m
extract 2^m
multiply the rest
you mean,
1x3x7x9 = 9(mod 10)
...
1991x1993x1997x1999=9 (mod 10)
All times up = 9 (mod 10)
There 're
4(3) + 3(16-3) + 2(80-16) + (400-80)
=12 + 39 + 128 + 320
=499 factor 5
And there are
10(1) + 9(3-1) + 8(7-3) + 7(15-7) + 6(31-15) + 5(62 - 31) + 4(125-62) + 3(250-125) + 2(500-250) + (1000-500)
=10 + 18 + 32 + 56 + 96 + 155 + 252 + 375 + 500 + 500
=1994 factor 2
So (1994-499)=1495 factor 2 remaining.
What to do next?