com_projet/modular_arithmetic.py

7 lines
129 B
Python
Raw Normal View History

# Challenge 1 - gcd
def gcd(a: int, b: int) -> int:
while b != 0:
r = a % b
a = b
b = r
return a