Skip to main content
grasp.study
About
Explore
Pricing
Log in
Try it for free
Back to course
👋
Welcome to a Grasp lesson
Create a free account
to keep studying and create your own study path.
Competitive Programming: Game Theory & More
·
Module 2
Modular Arithmetic Operations
1
Preventing Overflow with Modular Arithmetic
Apply modular arithmetic properties for addition, subtraction, and multiplication to prevent integer overflow.
Binary Exponentiation (a^b mod m)
Implement binary exponentiation to compute (a^b) mod m in O(log b) time.
3
Modular Multiplicative Inverse using Fermat's Little Theorem
Define and compute the modular multiplicative inverse for a prime modulus using Fermat's Little Theorem.
4
Modular Division Using Modular Inverse
Perform modular division (a/b) mod p by multiplying with the modular inverse of b.
5
Solving Linear Congruences
Solve basic linear congruences of the form ax ≡ b (mod m).
Next module isn't ready yet,
Back to course
Previous module
Core Number Theory: Primes and Divisibility
Next module