PythiloEasy · 12 min · Task 41 of 100 · progress kept in this browser

Greatest common divisor

Return the nonnegative greatest common divisor of two integers. Define gcd(0,0) as zero.

a, b = 48, 18
a, b = b, a % b
print(a, b)
Your task

Return the nonnegative greatest common divisor of two integers. Define gcd(0,0) as zero.