summaryrefslogtreecommitdiff
path: root/day1/exercise/gcd.py
blob: 41db13d9b11e89469f5c4d8696cdea1ff8f891ce (plain)
1
2
3
4
5
6
7
8
def gcd(a, b):
  if a % b == 0:
    return b
  return gcd(b, a%b)

print gcd(5, 40)
print gcd(11, 60)