summaryrefslogtreecommitdiff
path: root/day1/exercise/gcd.py
blob: 35d704e316a617b2416dc060bd3cd40235d36b51 (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)