mirror of
https://hub.njuu.cf/TheAlgorithms/Python.git
synced 2023-10-11 13:06:12 +08: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()
|