fork download
  1. # your code goes here
  2. def gcd(a,b):
  3. if b==0:
  4. return a
  5. a,b= b,a%b
  6. gcd(a,b)
  7.  
  8. a,b = map(int,input().split())
  9. print(gcd(a,b))
Success #stdin #stdout 0.04s 9560KB
stdin
18 35
stdout
None