Advertisement
Guest User

Untitled

a guest
Sep 18th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.13 KB | None | 0 0
  1. int modInverse(int b, int m) {
  2. int x, y;
  3. int gcd = extendedEuclid(b, m, x, y);
  4. if (gcd != 1) return -1;
  5.  
  6. return x % m;
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement