Last active
April 23, 2020 04:45
-
-
Save rarecoil/70faef20173cf23de3effff3eeac3699 to your computer and use it in GitHub Desktop.
CryptoHack: Greatest common divisor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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