exponential modulo in py code example
Example: exponential modulo in py
(ab) mod p = ( (a mod p) (b mod p) ) mod p
For example a = 50, b = 100, p = 13
50 mod 13 = 11
100 mod 13 = 9
(50 * 100) mod 13 = ( (50 mod 13) * (100 mod 13) ) mod 13
or (5000) mod 13 = ( 11 * 9 ) mod 13
or 8 = 8