I can solve bigmod if range of m is <=10^9. But if range more than this range my procedure overflows. How can i solve (n^p)%m where (n,m,p)<=10^18
Asked
Active
Viewed 15 times