Wednesday, 3 April 2019

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

real analysis - How to find limhrightarrow0fracsin(ha)h

How to find limh0sin(ha)h without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...