Find the GCD without a single division
Euclid's algorithm, mental version: subtract the small from the big until you get the same value. That's the GCD.
The algorithm in 1 sentence
The GCD of two numbers doesn’t change if you replace the bigger one with its difference with the smaller.
Example step by step: GCD(84, 30)
| Step | Operation | Result |
|---|---|---|
| 1 | ||
| 2 | ||
| 3 | ||
| 4 | ||
| 5 | ||
| 6 | ✓ |
GCD(84, 30) = 6.
The « division » version (faster)
Instead of subtracting many times, take the remainder of the division:
- → GCD(30, 24)
- → GCD(24, 6)
- → GCD = 6.
This is the classic Euclidean algorithm.
Spot-the-shortcut
If both numbers end in the same even digit, try 2 as a factor. If both are multiples of 3 (digit sum), try 3. Skip the algorithm.
What is the GCD of 48 and 36?
