Loading repovive.com/problems/classics/25
Given integers and (where is a prime number), find the modular multiplicative inverse of modulo .
The modular inverse of modulo is an integer such that:
When is prime and is not divisible by , use Fermat's Little Theorem: