ユークリッドの互除法
A modular multiplicative inverse of modulo can be found by using the extended Euclidean algorithm.