summaryrefslogtreecommitdiff
path: root/progs/a408.py
blob: 69e579aa5f0a21286c746a594b839b0e64e38c65 (plain)
1
2
3
4
5
6
7
8
9
10
11
def find_gcd(x, y): 
	while(y): 
		x, y = y, x % y 
	return x 
def get_gcd(l):
  num1 = l[0]
  num2 = l[1]
  gcd = find_gcd(num1, num2)
  for i in range(2, len(l)):
    gcd = find_gcd(gcd, l[i])
  return gcd