Congruence and Modular Arithmetic
Modular Multiplicative Inverse
Competitive Programming
Needed to learn this after messing up this question https://codeforces.com/contest/2008/problem/F
Resources
This is calculated using EEA.
MATH135
Inverses in (INV )
Let be an integer with . The element in has a multiplicative inverse if and only if . Moreover, when , the multiplicative inverse is unique.
Inverses in (INV )
For all prime numbers and non-zero elements in , the multiplicative inverse exists and is unique.