fork(16) download
  1. # your code goes here
  2. def gcd (a,b):
  3. if (b == 0):
  4. return a
  5. else:
  6. return gcd (b, a % b)
  7. A = [12, 24, 27, 30, 36]
  8. res = A[0]
  9. for c in A[1::]:
  10. res = gcd(res , c)
  11. print res
Success #stdin #stdout 0.01s 7736KB
stdin
Standard input is empty
stdout
3