Skip to content

Instantly share code, notes, and snippets.

@mbrenig
Created June 5, 2013 17:32
Show Gist options
  • Save mbrenig/5715678 to your computer and use it in GitHub Desktop.
Save mbrenig/5715678 to your computer and use it in GitHub Desktop.
Euclid's greatest common divisor algorithm
def gcd(a,b):
while a != 0:
a, b = b % a, a
return b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment