Professional Documents
Culture Documents
Important Math Topics For Competitive Programming
Important Math Topics For Competitive Programming
MATH TOPICS
FOR
COMPETITIVE
PROGRAMMING
1. MODULAR ARITHMETIC
Factorization + Prime
Factorization
Number/Sum of Divisors
Primality testing
Sieve of Eratosthenes
Smallest Prime Factor
4. BINARY EXPONENTIATION
Calculates power of a
number
Modular exponentiation
Matrix exponentiation
(only basics)
5. EUCLIDEAN ALGORITHM
Calculates GCD of 2
numbers
Extended Euclidean
Algorithm
General Modular Inverse
Linear Diophantine
Equations
6. EULER'S TOTIENT FUNCTION
Count number of
coprime numbers to N
Euler's Theorem
Fermat's Theorem
Modular Inverse wrt a
Prime