Example #1
0
def gcd_list(l):
    # greatest common divisor for a list of numbers
    from scitbx.math import gcd_int_simple as gcd
    result = l[0]
    for i in range(1, len(l)):
        result = gcd(result, l[i])
    return result
def gcd_list(l):
  # greatest common divisor for a list of numbers
  from scitbx.math import gcd_int_simple as gcd
  result = l[0]
  for i in range(1, len(l)):
    result = gcd(result, l[i])
  return result