Last active
December 30, 2015 07:19
-
-
Save calvingiles/f32c8c83e2cb348dcd61 to your computer and use it in GitHub Desktop.
Return the greatest common denominator of a and b.
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
def GCD(a, b): | |
if b: | |
return GCD(b, a % b) | |
return a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment