PY/MATH
Challenges
Arithmetic · Medium

Greatest Common Divisor

Write `gcd(a, b)` returning the greatest common divisor (Euclid's algorithm).

Examples
Input: gcd(12, 18)
Output: 6
Input: gcd(100, 75)
Output: 25
solution.py○ Loading…
Loading...
Console
Test cases
gcd(12, 18)PENDING
gcd(100, 75)PENDING
gcd(17, 13)PENDING
HiddenPENDING
Hints