Can someone tell me the efficient way to solve this problem ?
abc mod m
where m is not a prime number and a is not coprime to m?I've looking for the answer, but haven't found it There are some answered questions that familiar with this question, but none of them can explain my problem. Remember if-
2cs.stackexchange.com is probably a better place for this question.– R SahuNov 12, 2014 at 16:42
-
This question appears to be off-topic because cs.stackexchange.com is a better place for this question.– R SahuNov 12, 2014 at 16:44
-
5It's not really a duplicate of the pow question. The common problem is computing this without overflow.– hatchet - done with SOverflowNov 12, 2014 at 16:46
-
Thanks hatchet for spotting the main issue. +1– fjardonNov 12, 2014 at 16:47
-
1So what you want is not just a ModPow function, but a ModPowPow function.– hatchet - done with SOverflowNov 12, 2014 at 16:52
|
Show 6 more comments