Created
July 14, 2019 14:34
-
-
Save return0927/887cc55b6562f284369f2dd5ba71f0b5 to your computer and use it in GitHub Desktop.
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(x, y): | |
while(y): | |
x, y = y, x % y | |
return x | |
# 재귀함수 | |
def recursive_gcd(a,b): | |
if(b==0): | |
return a | |
else: | |
return recursive_gcd(b,a%b) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment