Skip to content

Instantly share code, notes, and snippets.

@henriquesebastiao
Created July 31, 2023 15:29
Show Gist options
  • Save henriquesebastiao/3f438d7bc6ba1596359b50e47975696b to your computer and use it in GitHub Desktop.
Save henriquesebastiao/3f438d7bc6ba1596359b50e47975696b to your computer and use it in GitHub Desktop.
O algoritmo de euclides é uma maneira simples de calcular o MDC (Máximo Divisor Comum) entre dois dois números inteiros diferentes de zero.
def mdc(a: int, b: int) -> int:
if b == 0:
return a
else:
return mdc(b, a % b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment