JBCM627
Veteran
Hey! What about my solution? It's the only non-mod solution around, because I figured most people would use mod to solve it, so I wanted to be "different"
...
Last three digits of [ - (2009C2)*100 + 2009*10 - 1 ]
= -[last digit of 2009C2]*100 + 90 -1
= -[2009!/2!2007!]*100 + 89
= -[2009*2008/2]*100 + 89
= -[last digit of 9*8/2]*100 + 89
= -511
1000-511 = 489
By saying take the "last n digits of x", you are more or less taking x mod 10^n. But agreed, it is a bit more intuitive than explicitly using mods.
The simplest way I could think of was to do (calculator required):
(2009^2009)%1000
= (9^2009)%1000
= (9^41*7*7)%1000
= (((9^41)^7)^7)%1000
= (((((9^41)%1000)^7)%1000)^7)%1000
(calculator now required... pc's calculator works fine, or TI89)
= (((409^7)%1000)^7)%1000
= (769^7)%1000
= 489
Last edited: