Calculating (a power b) mod p

Revision en1, by devarshi09, 2018-07-10 02:36:07

How to calculate (a power b) mod p correctly if b is exceeding long long integer limit in c++.

Tags modular arithmetic, fast power

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English devarshi09 2018-07-10 02:36:07 123 Initial revision (published)