You are given two positive integer lists with a random number of elements (1 <= n <= 100). Create a [GCD](https://en.wikipedia.org/wiki/Greatest_common_divisor) matrix and calculate the average of all values. 

Return a float value rounded to 3 decimal places. 


## Example

```
a = [1, 2, 3]
b = [4, 5, 6]

#       a =    1  2  3     b =
gcd(a, b) = [ [1, 2, 1],   # 4
              [1, 1, 1],   # 5
              [1, 2, 3] ]  # 6

average(gcd(a, b)) = 1.444
```

Difficulty: EASY
Starter code: def gcd_matrix(a,b):
	

Solutions:
from math import gcd

def gcd_matrix(a, b):
	return round(sum((gcd(m, n) for m in a for n in b)) / (len(a) * len(b)), 3)


def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)

def gcd_matrix(a, b):
	g = []
	for i in a:
		for j in b:
			g.append(gcd(i, j))
	return round(sum(g) / len(g), 3)


from math import gcd

def gcd_matrix(a, b):
	return round(sum((sum((gcd(i, j) for j in b)) for i in a)) / (len(a) * len(b)), 3)


from math import gcd

def gcd_matrix(a, b):
	k = a[:]
	p = 0
	for i in range(len(b)):
		s = []
		for j in range(len(a)):
			k[j] = gcd(a[j], b[i])
			s.append(k[j])
		p += sum(s)
	return round(p / (len(a) * len(b)), 3)


def gcd_matrix(a, b):

	def gcd(a2, b2):
		for i in range(min(a2, b2), 0, -1):
			if a2 % i == 0 and b2 % i == 0:
				return i
	output = 0
	for i in a:
		for j in b:
			output += gcd(i, j)
	return round(output / (len(a) * len(b)), 3)