If you have to calculate pow(a,b)%mod.
where a and b are large numbers like 10^100000(100000 digits) and mod is any prime number.
In programming language like C,C++,python it is very difficult to process such a large data. So here is a method to solve that problem.
where a and b are large numbers like 10^100000(100000 digits) and mod is any prime number.
In programming language like C,C++,python it is very difficult to process such a large data. So here is a method to solve that problem.
If you know any better method please comment
ReplyDelete