Skip to content

Instantly share code, notes, and snippets.

@lowteq
Created December 2, 2019 15:05
Show Gist options
  • Save lowteq/bb43c715df1e3e73890c79701baf64d9 to your computer and use it in GitHub Desktop.
Save lowteq/bb43c715df1e3e73890c79701baf64d9 to your computer and use it in GitHub Desktop.
ユークリッドの互除法
def gojo(m, n):
return m if n == 0 else gojo(n, m % n)
x, y = map(int, input().split())
print(gojo(x, y))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment