PY/MATH
Home
Challenges
Concepts
Progress
Final Project
0 XP
·
L1
EN
NO
☾
⚙
← 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…
Reset
Loading...
Run code
Check solution
Console
Test cases
gcd(12, 18)
PENDING
gcd(100, 75)
PENDING
gcd(17, 13)
PENDING
Hidden
PENDING
Hints
Reveal next hint
>_