Skip to content

Instantly share code, notes, and snippets.

@rarecoil
Last active April 23, 2020 04:45
Show Gist options
  • Save rarecoil/70faef20173cf23de3effff3eeac3699 to your computer and use it in GitHub Desktop.
Save rarecoil/70faef20173cf23de3effff3eeac3699 to your computer and use it in GitHub Desktop.
CryptoHack: Greatest common divisor
#!/usr/bin/env python3
def gcd(a, b):
while b != 0:
t = b
b = a % b
a = t
return a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment