mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-12-01 00:41:09 +00:00
13 lines
151 B
Python
13 lines
151 B
Python
|
def gcd(a, b):
|
||
|
if a == 0 :
|
||
|
return b
|
||
|
|
||
|
return gcd(b%a, a)
|
||
|
|
||
|
def main():
|
||
|
print(gcd(3, 6))
|
||
|
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
main()
|