Created
August 28, 2021 19:21
-
-
Save japm48/a91dd96e3f689aa688d4cfa56946be85 to your computer and use it in GitHub Desktop.
Eclidean GCD in python
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 euclidean_gcd(a, b): | |
while a != b: | |
if a > b: | |
a -= b | |
else: | |
b -= a | |
return a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment