Modular Multiplicative Inverse
Medium
Math & Number Theory
Given a and a prime m, print the modular inverse x such that (a * x) mod m = 1.
Constraints
1 <= a < m <= 10^9 + 7 (m is prime)
Discussion
No discussions yet.
Join Shalyam Newsletter
Get exclusive insights with every issue: education, research and innovation news.
Shalyam Support
Hi! Ask us anything โ we'll reply on WhatsApp or Telegram within 24 hours.