Wednesday, August 9, 2017

elementary number theory - What is the best algorithm for finding the last digit of an enormous exponent?

I found most answers here not clear enough for my case such as



1231551315143154515131323164343214547




I wrote the nmod10 in Python and execution time ran out. So I need a faster algorithm or method. Sometimes, the result is incorrect as it failed the test case.

No comments:

Post a Comment

analysis - Injection, making bijection

I have injection f:AB and I want to get bijection. Can I just resting codomain to f(A)? I know that every function i...