Sunday, May 19, 2013

10515 - Powers Et Al.



(1) Divide n by 4
(2) If the remainder is r, then the last digit is ((m%10)^r)%10. 
(3) if the remainder is zero, set r=4 and do (2).



No comments:

Post a Comment