day1/exercise/gcd.py
changeset 64 333092b68926
child 428 ee689f7c3122
equal deleted inserted replaced
63:f5eac04a00fe 64:333092b68926
       
     1 def gcd(a, b):
       
     2   if a % b == 0:
       
     3     return b
       
     4   return gcd(b, a%b)
       
     5 
       
     6 print gcd(5, 40)
       
     7 print gcd(11, 60)
       
     8