from random import randint


def create_matrix(length):
    rows = []
    for i in range(length):
        tnp = []
        for s in range(length):
            tnp.append(randint(0, 10))
        rows.append(tnp)
    return rows


matrix = create_matrix(2)


def sum_of_elements_by_divider(matrix, divider):
    s = 0
    for parentList in matrix:
        for matrixItem in parentList:
            if matrixItem % divider == 0:
                s += matrixItem
    return s


print(matrix)
print(sum_of_elements_by_divider(matrix, 3))

95a1cd4c8fdd8a1a72de74284de7f6032a4bbcd7
<mask token>


def create_matrix(length):
    rows = []
    for i in range(length):
        tnp = []
        for s in range(length):
            tnp.append(randint(0, 10))
        rows.append(tnp)
    return rows


<mask token>


def sum_of_elements_by_divider(matrix, divider):
    s = 0
    for parentList in matrix:
        for matrixItem in parentList:
            if matrixItem % divider == 0:
                s += matrixItem
    return s


<mask token>

<mask token>


def create_matrix(length):
    rows = []
    for i in range(length):
        tnp = []
        for s in range(length):
            tnp.append(randint(0, 10))
        rows.append(tnp)
    return rows


<mask token>


def sum_of_elements_by_divider(matrix, divider):
    s = 0
    for parentList in matrix:
        for matrixItem in parentList:
            if matrixItem % divider == 0:
                s += matrixItem
    return s


print(matrix)
print(sum_of_elements_by_divider(matrix, 3))

<mask token>


def create_matrix(length):
    rows = []
    for i in range(length):
        tnp = []
        for s in range(length):
            tnp.append(randint(0, 10))
        rows.append(tnp)
    return rows


matrix = create_matrix(2)


def sum_of_elements_by_divider(matrix, divider):
    s = 0
    for parentList in matrix:
        for matrixItem in parentList:
            if matrixItem % divider == 0:
                s += matrixItem
    return s


print(matrix)
print(sum_of_elements_by_divider(matrix, 3))

from random import randint


def create_matrix(length):
    rows = []
    for i in range(length):
        tnp = []
        for s in range(length):
            tnp.append(randint(0, 10))
        rows.append(tnp)
    return rows


matrix = create_matrix(2)


def sum_of_elements_by_divider(matrix, divider):
    s = 0
    for parentList in matrix:
        for matrixItem in parentList:
            if matrixItem % divider == 0:
                s += matrixItem
    return s


print(matrix)
print(sum_of_elements_by_divider(matrix, 3))
