fork download
  1. # your code goes here
  2. def gcd(a, b):
  3. if b == 0:
  4. return a
  5. else:
  6. r = a % b
  7. return gcd(b, r)
  8.  
  9. print(gcd(21, 35))
Success #stdin #stdout 0.02s 28384KB
stdin
Standard input is empty
stdout
7