GCD, LCM & the Euclidean Algorithm
Compute divisors fast and correctly.
Why Divisors Matter
So many contest problems hinge on shared factors of two numbers. The single most useful tool here is the GCD, the greatest common divisor. 🔢
What GCD Means
The GCD of two integers is the largest number that divides both with no remainder. For 12 and 18 it is 6, since 6 splits both evenly.
All lessons in this course
- GCD, LCM & the Euclidean Algorithm
- Primality Testing up to sqrt(n)
- Sieve of Eratosthenes
- Prime Factorization & Divisors