Compare commits
No commits in common. "6d8e66cc05f68c379d28d99b13a95073cfc66dcb" and "39b258ffec25f2f23d6dbd780002ee76caffd27a" have entirely different histories.
6d8e66cc05
...
39b258ffec
16
solution8.py
16
solution8.py
@ -1,16 +0,0 @@
|
|||||||
def gcd(a: int, b: int) -> int:
|
|
||||||
result = []
|
|
||||||
for i in range(1, min(a, b) + 1):
|
|
||||||
if a % i == 0 and b % i == 0:
|
|
||||||
result.append(i)
|
|
||||||
else:
|
|
||||||
continue
|
|
||||||
return max(result)
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
print(gcd(18, 24))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user