Created
December 22, 2018 17:34
-
-
Save cemdrk/7ce97dc67795333763ecc156a4a856f1 to your computer and use it in GitHub Desktop.
Euclid Greatest Common Divisor python implementation
This file contains 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
def gcd(n, m): | |
while n: | |
n, m = m % n, n | |
return m |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment