Problem:
Matrix Vector Multiplication Write a program which reads a $ n \times m$ matrix $A$  and a $m \times 1$ vector $b$, and prints their product $Ab$. A column vector with m elements is represented by the following equation. A $n \times m$ matrix with $m$ column vectors, each of which consists of $n$ elements, is represented by the following equation. $i$-th element of a $m \times 1$ column vector $b$ is represented by $b_i$ ($i = 1, 2, ..., m$), and the element in $i$-th row and $j$-th column of a matrix $A$ is represented by $a_{ij}$ ($i = 1, 2, ..., n,$  $j = 1, 2, ..., m$). The product of a $n \times m$ matrix $A$ and a $m \times 1$ column vector $b$ is a $n \times 1$ column vector $c$, and $c_i$ is obtained by the following formula: Input In the first line, two integers $n$ and $m$ are given. In the following $n$ lines, $a_{ij}$ are given separated by a single space character. In the next $m$ lines, $b_i$ is given in a line. Output The output consists of $n$ lines. Print $c_i$ in a line. Constraints  $1 \leq n, m \leq 100$  $0 \leq b_i, a_{ij} \leq 1000$  Sample Input 3 4
1 2 0 1
0 3 0 1
4 1 1 0
1
2
3
0 Sample Output 5
6
9

Solution (Python):
n,m=map(int,input().split())
A=[input().split()for _ in range(n)]
b=[int(input())for _ in range(m)]
[print(sum(int(x)*y for x,y in zip(a,b)))for a in A]

Solution (Python):
n,m = map(int,input().split())

a = []
b = []

for i in range(n):
    a.append([int(j) for j in input().split()])
for i in range(m):
    b.append(int(input()))

for i in range(n):
    c = 0
    for j in range(m):
        c += a[i][j] * b[j]
    print(c)

Solution (Python):
l = input().split()
n = int(l[0])
m = int(l[1])

a = []
for i in range(n):
    a.append(list(map(int, input().split())))

b = []
for i in range(m):
    b.append(int(input()))

c = [[] for i in range(n)]
for i in range(n):
    for j in range(m):
        c[i].append(a[i][j] * b[j])
    print(sum(c[i]))

Solution (Python):
n, m = map(int, input().split())
vector_a = []
vector_b = []
for i in range(n):
    vector_a.append(list(map(int,input().split())))
for i in range(m):
    vector_b.append(list())
    vector_b[i]=int(input())

for i in range(n):
    tmp=0
    for j in range(m):
        tmp+=vector_a[i][j]*vector_b[j]
    print(tmp)

Solution (Python):
n, m = map(int, raw_input().split())
a = []
for _ in range(n):
	a.append(map(int, raw_input().split()))
b = []
for _ in range(m):
	b.append(int(raw_input()))
for i in range(n):
	c = []
	for j in range(m):
		c.append(a[i][j]*b[j])
	print sum(c)

Solution (Python):
n, m = map(int, raw_input().split())
a, b = [], []
c = [0 for _ in range (n)]
for _ in range(n):
	a.append(map(int, raw_input().split()))
for _ in range(m):
	b.append(int(raw_input()))
for i in range(n):
	c[i] = 0
	for j in range(m):
		c[i] += a[i][j]*b[j]
	print c[i]

Solution (Python):
n, m = map(int, raw_input().split())
a, b = [], []
c = [0 for _ in range (n)]
for _ in range(n):
	a.append(map(int, raw_input().split()))
for _ in range(m):
	b.append(int(raw_input()))
for i in range(n):
	for j in range(m):
		c[i] += a[i][j]*b[j]
	print c[i]

Solution (Python):
data = list(map(int, list(input().split())))
row = data[0]
column = data[1]
matrix = [[0 for i in range(column)] for j in range(row)]
vector = [[0] for k in range(column)]
vector_multi = [[0] for l in range(row)]

for i in range(row):
    data_row = list(map(int, list(input().split())))
    for j in range(column):
        matrix[i][j] = data_row[j]

for i in range(column):
    vector[i] = int(input())

for i in range(row): 
    element = 0
    for j in range(column):
        element += matrix[i][j] * vector[j]
    vector_multi[i][0] = element

for i in vector_multi:
    print(i[0])

Solution (Python):
n, m = map(int, input().split())

A = []
b = []

for i in range(n):
    A.append([int(j) for j in input().split()])

for i in range(m):
        b.append(int(input()))

for i in range(n):
    s = 0
    for j in range(m):
        s += A[i][j] * b[j]
    print(str(s))

Solution (Python):

array = map(int, raw_input().split())
n = array[0]
m = array[1]
a = [[0 for i in range(m)] for j in range(n)]
b = [0 for i in range(m)]
answer = [0 for i in range(n)]
for i in range(n):
    a[i] = map(int, raw_input().split())
for j in range(m):
    b[j] = input()
for i in range(n):
    for j in range(m):
        answer[i] += a[i][j] * b[j]
for i in range(n):
    print answer[i]

Solution (Python):
n, m = map(int, input().split())
A = [list(map(int, input().split())) for _ in range(n)]
for i in range(m):
    b = int(input())
    for j in range(n):
        A[j][i] *= b
for j in range(n):
    print(sum(A[j]))

Solution (Python):
n, m = list(map(int, input().split()))

A = [list(map(int, input().split())) for i in range(n)]
bt = [int(input()) for i in range(m)]

for i in range(n):
    print(sum([x * y for (x, y) in zip(A[i], bt)]))

Solution (Python):
'''
1 1 1
2 2 2
1
2
3
とあったら、1*1+1*2+1*3
          2*1+2*2+2*3
みたいな感じ。
'''

from operator import add
from functools import reduce


n,m = map(int,input().split())



a = [list(map(int, input().split())) for n in range(n)]


b = [int(input()) for n in range(m)]




c = []
for n in range(n):
    c.append([a[n][m]*b[m] for m in range(m)])
    


d=[reduce(add,c[n]) for n in range(len(c))]





[print(d[i]) for i in range(len(d))]

Solution (Python):
n,m = map(int,raw_input().split())
for i in range(0,n):
    if i == 0:
        matrix = [map(int,raw_input().split())]
    else:
        matrix.append(map(int,raw_input().split()))
vec=[]
for j in range(0,m):
    vec.append(raw_input())
mul = []
for k in range(0,n):
    num_sum=0
    for l in range(0,m):
        num_sum += matrix[k][l] * int(vec[l])
    print num_sum

Solution (Python):
import sys

(row, column) = sys.stdin.readline().rstrip('\r\n').split(' ')
row = int(row)
column = int(column)

a = []
b = []
c = []

for ii in range(row):
  a.append([int(x) for x in input().rstrip('\r\n').split(' ')])

for ii in range(column):
  b.append(int(input().rstrip('\r\n')))

for ii in range(len(a)):
  work = 0
  for jj in range(len(a[ii])):
    work += a[ii][jj] * b[jj]
  c.append(work)

for cc in c:
  print(cc)

Solution (Python):
n,m = [int(i) for i in input().split()]

A = [[int(i) for i in input().split()] for j in range(n)]
B = [int(input()) for i in range(m)]

for i in range(n):
    c = 0
    for j in range(m):
        c += A[i][j]*B[j]
    print(c)

Solution (Python):
n,m = [int(x) for x in input().split( )]
a = [[0 for x in range(m)] for y in range(n)]
b = []
for i in range(n):
    retsu = [int(x) for x in input().split( )]
    a[i] = retsu
for j in range(m):
    b.append(int(input()))
answer = []
for i in range(n):
    value = 0
    for j in range(m):
        value += a[i][j]*b[j]
    answer.append(value)
for ans in answer:
    print(ans)

Solution (Python):
a, b = map(int, input().split())
mat = [map(int, input().split()) for i in range(a)]
vec = [int(input()) for i in range(b)]
for row in mat:
    print(sum([x*y for x, y in zip(row, vec)]))

Solution (Python):


a, b = (int(i) for i in input().split())

n = [[0 for i in range(b)] for j in range(a)]
m = [0 for i in range(b)]

for i in range(a):
    n[i] = input().split()

for i in range(b):
    m[i] = int(input())

for i in range(a):
    x = 0
    for j in range(b):
        x += int(n[i][j]) * m[j]
    print(x)

Solution (Python):
n,m = map(int,input().split())
mat=[]
v=[]
for i in range(n):
    a=list(map(int,input().split()))
    mat.append(a)

for j in range(m):
    v.append(int(input()))

for i in range(n):
    w = 0
    for j in range(m):
        w += mat[i][j]*v[j]
    print(w)

Solution (Python):



import sys

n, m = map(int, sys.stdin.readline().split())
matrix_a = list()
matrix_b = list()

for i in range(n):
    matrix_a.append(list(map(int, sys.stdin.readline().split())))

for i in range(m):
    matrix_b.append(int(sys.stdin.readline()))




for i in range(n):
    product = 0
    for x in range(m):
        product += matrix_a[i][x]*matrix_b[x]
    print(product)

Solution (Python):
n,m=map(int,input().split())
a=[list(map(int,input().split())) for _ in range(n)]
b=[int(input()) for _ in range(m)]
[print(sum([j*k for j,k in zip(a[i],b)])) for i in range(n)]

Solution (Python):
n, m = map(int, input().split())
mat = []
for _ in range(n):
    mat.append(list(map(int, input().split())))

vec = []
for _ in range(m):
    vec.append(int(input()))

result = []
for line in mat:
    c = sum([line[i] * vec[i] for i in range(m)])
    result.append(c)

print("\n".join(map(str, result)))

Solution (Python):
n,m = map(int,input().split())

a = [0 for i in range(n)]
b = [0 for j in range(m)]
c = []

for i in range(n):
    a[i] = input().split()
    a[i] = [int(x) for x in a[i]]
for j in range(m):
    b[j] = int(input())

temp = 0
for i in range(n):
    for j in range(m):
        temp += a[i][j]*b[j]
    c.append(temp)
    temp = 0

for num in c:print(num)

Solution (Python):
n, m = map(int, input().split())
a = []
b = []
c = []
for i in range(n):
    a.append(list(map(int, input().split())))
for i in range(m):
    b.append(int(input()))
for i in range(n):
    elm = 0
    for k in range(m):
        elm += a[i][k] * b[k]
    c.append(elm)
for i in c:
    print(i)

Solution (Python):
n, m = map(int, input().split(' '))
A = []
i = 0
while i < n:
    a = list(map(int, input().split(' ')))
    A.append(a)
    i += 1
x = []
j = 0
while j < m:
    x.append(int(input()))
    j += 1
ans = ''
p = 0
while p < n:
    q = 0
    a0 = 0
    while q < m:
        a0 += A[p][q] * x[q]
        q += 1
    ans += str(int(a0)) + '\n'
    p += 1
print(ans[:-1])

Solution (Python):
import sys

i,j = input().split()

matrixa = []

for _ in range(int(i)):
    matrixa += [[int(n) for n in sys.stdin.readline().split()]]

matrixb =[ int(num) for num in sys.stdin.readlines() ]

matrixc = [ 0 for _ in range(int(i))]

for n in range(int(i)):
    for a,b in zip(matrixa[n],matrixb):
        matrixc[n] += a*b
for c in matrixc:
    print(c)

Solution (Python):
n, m = map(int, input().split())
matrix = []
lines = []
c_ele = []

for i in range(n):
    matrix.append(list(map(int, input().split())))

for j in range(m):
    lines.append(int(input()))

for k in range(n):
    sum = 0
    for l in range(m):
        sum += matrix[k][l] * lines[l]
    c_ele.append(sum)

for p in c_ele:
    print(p)

Solution (Python):
n,m=map(int,input().split())
a=[list(map(int,input().split())) for _ in range(n)]
b=[int(input()) for _ in range(m)]
[print(sum([j*k for j,k in zip(a[i],b)])) for i in range(n)]

Solution (Python):
n,m=map(int,input().split())
a=[list(map(int,input().split())) for _ in range(n)]
b=[int(input()) for _ in range(m)]
[print(sum([j*k for j,k in zip(a[i],b)])) for i in range(n)]

Solution (Python):
n,m=map(int,input().split())
a=[list(map(int,input().split())) for _ in range(n)]
b=[int(input()) for _ in range(m)]
[print(sum([j*k for j,k in zip(a[i],b)])) for i in range(n)]

Solution (Python):
n,m=map(int,input().split())
a=[list(map(int,input().split())) for _ in range(n)]
b=[int(input())for _ in range(m)]
[print(sum([j*k for j,k in zip(a[i],b)]))for i in range(n)]

Solution (Python):
n,m=list(map(int,input().split(' ')))
am=[[0 for j in range(m)] for i in range(n)]
bm=[0 for l in range(m)]
cm=[0 for i in range(n)]
for i in range(n):
    am[i]=list(map(int,input().split(' ')))
for j in range(m):
    bm[j]=int(input())
for i in range(n):
    for j in range(m):
        cm[i]=cm[i]+am[i][j]*bm[j]
for i in range(n):
    print(cm[i])

Solution (Python):
n, m = map(int, input().split())
a = []
b = []
for _ in range(n):
  t = list(map(int, input().split()))
  a.append(t)
for _ in range(m):
  b.append(int(input()))
for i in range(n):
  t = 0
  for j in range(m):
    t += a[i][j] * b[j]
  print(t)

Solution (Python):
n, m = map(int, input().split())
a = [list(map(int, input().split())) for _ in range(n)]
b = [int(input()) for _ in range(m)]
for i in range(n):
  print(sum([j * k for j, k in zip(a[i], b)]))

Solution (Python):
vec1 = []
vec2 = []

n, m = map(int, input().split())
for x in range(1, n+1):
    vec1.append(list(map(int, input().split())))

for y in range(m):
    vec2.append(int(input()))

for j in vec1:
    result = 0
    for w, z in zip(j, vec2):
        result += w * z
    print(result)

Solution (Python):
import sys

l = []
result = []
for i in sys.stdin:
    l.append(i)

for i in range(0,len(l)):
    l[i] = l[i].split()
    for j in range(0,len(l[i])):
        l[i][j] = int(l[i][j])

for i in range(1,l[0][0]+1):
    a = []
    for j in range(0,l[0][1]):
        a.append(l[i][j] * l[j+l[0][0]+1][0])
    result.append(sum(a))

for data in result:
    print(data)

Solution (Python):
n,m= map(int,input().split())
A_line =[]
row=[]

for i in range(n):
    line = [int(i) for i in input().split()]
    A_line.append(line)
for i in range(m):
    row += [int(i) for i in input().split()]
for i in range(n):
    c=0
    for j in range(m):
        c += A_line[i][j]*row[j]
    print(c)

Solution (Python):
n = list(map(int, input().split()))
a = []
b = []

for i in range(n[0]):
    a.append(list(map(int, input().split())))

for i in range(n[1]):
    b.append(int(input()))

for i in range(n[0]):
    ab_sum = 0
    for j in range(n[1]):
        ab_sum += a[i][j] * b[j]
    print(ab_sum)

Solution (Python):
n,m = tuple(int(i) for i in input().split())
A = [[int(j) for j in input().split()] for k in range(n)]
b = [int(input()) for p in range(m)]
R = [sum([A[p][q] * b[q] for q in range(m)]) for p in range(n)]

for r in R:
    print(str(r))

Solution (Python):
n, m = map(int, input().split())
List1 = [[0 for i in range(m)] for i in range(n)]
for x in range(n):
    List1[x] = list(map(int, input().split()))
List2 = [int(input()) for i in range(m)]
sum = [0 for i in range(n)]
for x in range(n):
    for y in range(m):
        sum[x] += List1[x][y] * List2[y]
for x in range(n):
    print(sum[x])

Solution (Python):
行数, 列数 = map(int, input().split())


行列 = [[0 for _ in range(列数)] for __ in range(行数)]


for 現在行 in range(行数):
    行データ = list(map(int, input().split()))
    for 現在列 in range(列数):
        行列[現在行][現在列] = 行データ[現在列]


ベクトル = [0 for _ in range(列数)]
for 現在行 in range(列数):
    ベクトル[現在行] = int(input())

答え = []

for i in range(行数):
    c = 0
    for j in range(列数):
        c += 行列[i][j] * ベクトル[j]
        
    答え.append(c)


for i in range(len(答え)):
    print(答え[i])

Solution (Python):
n,m = map(int,input().split())
A = []
B = []
for i in range(n):
	tmp = list(map(int,input().split()))
	A.append(tmp)
	tmp=[]
for i in range(m):
	num = int(input())
	B.append(num)
for i in range(n):
	c = 0
	for j in range(m):
		c += A[i][j]*B[j]
	print(c)

Solution (Python):
n,m=map(int,input().split())
A=[input().split()for _ in[0]*n]
b=[input()for _ in[0]*m]
for a in A:print(sum(int(x)*int(y)for x,y in zip(a,b)))

Solution (Python):
n,m=map(int,input().split())
A=[input().split()for _ in[0]*n]
b=[input()for _ in[0]*m]
for a in A:print(sum(int(x)*int(y)for x,y in zip(a,b)))

Solution (Python):
n,m = map(int,input().split())
matrix = [[0 for i in range(m)] for j in range(n)]
b = [0 for i in range(m)]
c = [0 for i in range(n)]
for i in range(0,n):
    matrix[i] = list(map(int,input().split()))
for i in range(0,m):
    b[i] = int(input())
for i in range(0,n):
    for j in range(0,m):
        c[i] += matrix[i][j]*b[j]
    print(c[i])

Solution (Python):
n,m = map(int,input().split())
A=[[] for i in range(n)]
for i in range(n):
    A[i] = list(map(int,input().split()))
b = []
c = list(map(int,'0'*n))
for i in range(m):
    b.append(int(input())) 
for i in range(n):
    for j in range(m):
        c[i] += A[i][j]*b[j]
for i in range(n):      
    print(c[i])

Solution (Python):
n, m = map(int, input().split())
a = []

for i in range(n):
    a.append(list(map(int, input().split())))

b = []
for i in range(m):
    b.append(int(input()))

for i in range(n):
    c = 0
    for j in range(m):
        c += a[i][j] * b[j]
    print(c)

Solution (Python):
l=input().split()
n=int(l[0])
m=int(l[1])


i=0
A=[]
while i<n:
    a=input().split()
    for p in a:
        A.append(int(p))
    i+=1


I=0
B=[]
while I<m:
    b=int(input())
    B.append(b)
    I+=1



q=0
C=[]
while q<n:
    Q=0
    cq=0
    while Q<m:
        cq+=A[m*q+Q]*B[Q]
        Q+=1
    C.append(cq)
    q+=1

for x in C:
    print(x)

Solution (Python):
size = [int(i) for i in input().split()]
matrix = [[0 for i in range(size[1])] for j in range(size[0])]
vector = [0 for i in range(size[1])]
for gyou in range(size[0]):
    x = [int(i) for i in input().split()]
    matrix[gyou] = x
for retsu in range(size[1]):
    x = int(input())
    vector[retsu] = x

for gyou in range(size[0]):
    print(sum(map(lambda val1, val2: val1 * val2, matrix[gyou], vector)))

Solution (Python):
N, M = map(int, raw_input().split())
A = [map(int, raw_input().split()) for _ in xrange(N)]
B = [int(raw_input()) for _ in xrange(M)]
     
for i in xrange(N):
    print sum(a*b for a, b in zip(A[i], B))

Solution (Python):
n, m = [int(_) for _ in input().split()]
matrix = []
for i in range(n):
    matrix.append([int(_) for _ in input().split()])
vector = []
for i in range(m):
    vector.append(int(input()))

for row in matrix:
    c = 0
    for i in range(m):
        c += row[i] * vector[i]
    print(c)

Solution (Python):
N = [int(i) for i in input().split()]

result = [0 for _ in range(N[0])]
row = []
col = []
for num, info in enumerate(range(N[0]+N[1])):
    if num < N[0]:
        row.append([int(i) for i in input().split()])
    else:
        col.append(int(input()))

for num, r in enumerate(row):
    res = 0
    for i, j in zip(r, col):
        res += i * j
    result[num] = res

for i in result:
    print(str(i))

Solution (Python):
n, m = list(map(int, input().split(' ')))
a = [list(map(int, input().split(' '))) for i in range(n)]
b = [int(input()) for i in range(m)]

for i in range(n):
    rst = 0
    for j in range(m):
        rst += a[i][j] * b[j]
    print(str(rst))

Solution (Python):
n, m = map(int, input().split())

a = [[]for _ in range(n)]

for i in range(n):
    a[i] = list(map(int, input().split()))
    
b = [[]for _ in range(m)]
for i in range(m):
    b[i] = int(input())

for i in range(n):
  c = 0
 
  for j in range(m):
    c += a[i][j]*b[j]
 
  print(c)

Solution (Python):
n,m=map(int,input().split())
s=[list(map(int,input().split())) for i in range(n)]
c=[list(map(int,input().split())) for b in range(m)]
ans=[0]*n
for i in range(n):
    for j in range(m):
        ans[i]+=s[i][j]*c[j][0]
for r in ans:
    print(r)

Solution (Python):
n, m = map(int, input().split())
A = []
for i in range(n):
    A.append(list(map(int, input().split())))

b = []
for i in range(m):
    b.append(int(input()))

for row in A:
    product = 0
    for e_A, e_b in zip(row, b):
        product += e_A * e_b
    print(product)

Solution (Python):


def numinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def main():
    a = numinput()
    n = a[0]; m = a[1] 
    M = []
    for i in range(n):
        data = numinput()
        list = []
        for j in range(m):
            list.append(data[j])
        M.append(list)
    b = []
    for j in range(m):
        b.append(int(input()))

    for i in range(n):
        sum = 0
        for j in range(m):
            sum += M[i][j] * b[j]
        print(sum)

if __name__ == "__main__":
    main()

Solution (Python):
n, m = map(int, input().split())
A = [list(map(int, input().split())) for _ in range(n)]
B = [int(input()) for _ in range(m)]

for i in range(n):
    print(sum([A[i][j] * B[j] for j in range(m)]))

Solution (Python):
n, m = map(int, input().split())
A = []
for i in range(n):
    A.append(list(map(int, input().split())))

b = []
for i in range(m):
    b.append(int(input()))

c = 0
for line in A:
    for i, j in zip(line, b):
        c += i * j
    print(c)
    c = 0

Solution (Python):
arr = list(map(int, input().split()))
n = arr[0]
m = arr[1]
matrix = [[0 for i in range(m)] for j in range(n)]

for i in range(n):
	arr = list(map(int, input().split()))
	for j in range(m):
		matrix[i][j] = arr[j]

b = [0] * m
for i in range(m):
	b[i] = int(input())

for i in range(n):
	sum = 0
	for j in range(m):
		sum += matrix[i][j] * b[j] 
	print(sum)
	sum = 0

Solution (Python):
n, m = map(int, input().split())
a = []
for _ in range(n):
    a.append(list(map(int, input().split())))
b = []
for _ in range(m):
    b.append(int(input()))

for i in range(n):
    s = 0
    for j in range(m):
        s += a[i][j] * b[j]
    print(s)

Solution (Python):
n,m = map(int, input().split())
Li = [[] for y in range(n)]
Li2 = []
a = 0
for x in range(n):
    Li[x] += list(map(int, input().split()))
for x in range(m):
    Li2.append(int(input()))
for x in range(n):
    for y in range(m):
        a += Li[x][y]*Li2[y]
    print(a)
    a = 0

Solution (Python):

import sys

n, m = input().strip().split(" ")
n = int(n) ;m = int(m)

c = n

a = []
for line in sys.stdin :
    a.append(line)
    c -= 1
    if c == 0 :
        break

c = m

b = []
for line in sys.stdin :
    b.append(line)
    c -= 1
    if c == 0 :
        break

for i in range(0, len(a)) :
    a[i] = a[i].strip().split(" ")
    for j in range(0, len(a[i])) :
        a[i][j] = int(a[i][j])

for i in range(0, len(b)) :
    b[i] = int(b[i].strip())

for i in range(0, n) :
    sum = 0
    for j in range(0, m) :
        sum += a[i][j]*b[j]
    print(sum)

Solution (Python):


matrixSize = [int(i) for i in input().rstrip().split()]
n = matrixSize[0]
m = matrixSize[1]

matrix = []
for i in range(n):
    array = [int(j) for j in input().rstrip().split()]
    matrix.append(array)


vector = [int(input()) for k in range(m)]


for i in range(n):
    multiple = 0
    for j in range(m):
        multiple += matrix[i][j] * vector[j]
    print(multiple)

Solution (Python):
n,m = map(int, input().split())
a = []
b = []
for i in range(n):
    a.append(list(map(int, input().split())))
for i in range(m):
    b.append(int(input()))
for i in range(n):
    csum = 0
    for k in range(m):
        csum = csum + b[k]*a[i][k]
    print('{}'.format(csum))

Solution (Python):
n, m = list(map(int, input().split()))
a=[]
for i in range(n):
	a.append([int(j) for j in input().split()])
b = []
for i in range(m):
	b.append(int(input()))
for i in range(n):
	s = 0
	for j in range(m):
		s += a[i][j] * b[j]
	print(s)

Solution (Python):
n,m = map(int,input().split())
A = [[0 for i in range(m)] for j in range(n)]
b = []
for i in range(n):
    line = input().split()
    for j in range(m):
        A[i][j] = int(line[j])
for i in range(m):
    b.append(int(input()))
for i in range(n):
    sumn = 0
    for j in range(m):
        sumn += A[i][j]*b[j]
    print(sumn)

Solution (Python):


n,m = map(int,input().split())
gyo_A = []
vec_b = []
ans = ""

for i in range(n):
    temp = [int(x) for x in input().split()]
    gyo_A.append(temp)

vec_b = [int(input()) for x in range(m)]

for i in range(n):
    vec_c = 0
    for j in range(m):
        vec_c += gyo_A[i][j] * vec_b[j]
    
    print(vec_c)

Solution (Python):
n, m = map(int, input().split())
a = [list(map(int, input().split())) for i in range(n)]
b = [int(input()) for i in range(m)]

c = [0] * n
for i in range(n):
    for j in range(m):
        c[i] += a[i][j] * b[j]

    print(c[i])

Solution (Python):
n, m = map(int, input().split())
a = [[] for i in range(n)]
b = [0 for j in range(m)]
for i in range(n):
    a[i] = list(map(int, input().split()))
for j in range(m):
    b[j] = int(input())
for row in range(n):
    tmp = 0
    for col in range(m):
        tmp += a[row][col] * b[col]
    print(tmp)

Solution (Python):
ll=[]
J=0
a,b=map(int,input().split())
for i in range(a):
    l=input().rstrip().split()
    l=list(map(int,l))
    ll+=l
    
for j in range(b):
    n=int(input())
    for i in range(a):
        ll[j]=ll[j]*n
        j=j+b

for i in range(0,a*b,b):
    print(sum(ll[i:i+b]))

Solution (Python):
n,m=map(int,input().split())
a=[list(map(int,input().split())) for _ in range(n)]
b=[int(input()) for _ in range(m)]
[print(sum([j*k for j,k in zip(a[i],b)])) for i in range(n)]

Solution (Python):
n,m=map(int,input().split())
a=[]

for i in range(n):
    a.append(list(map(int,input().split())))
    
b=[]
for i in range(m):
    b.append(int(input()))

for i in range(n):
    c=0
    for j in range(m):
        c+=a[i][j]*b[j]
    print(c)

Solution (Python):
n,m=map(int,input().split())
B=[list(map(int,input().split())) for i in range(n)]
A=[int(input()) for i in range(m)]

for i in range(n):
    ans=0
    for j in range(m):
        ans+=A[j]*B[i][j]
    print(ans)

Solution (Python):
n,m=map(int,input().split())
A=[list(map(int,input().split())) for i in range(n)]
b=[int(input()) for i in range(m)]
for i in range(n):
    ans=0
    for j in range(m):
        ans+=A[i][j]*b[j]
    print(ans)

Solution (Python):
n, m = map(int,input().split())
a = list()
for i in range(n):
    a.append(list(map(int,input().split())))

b = list()
for k in range(m):
    b.append(int(input()))

for i in range(n):
    ans = 0
    for j in range(m):
        ans += a[i][j] * b[j]
    print(ans)

Solution (Python):
n,m=map(int,input().split())
a=[list(map(int,input().split())) for i in range(n)]
b=[int(input()) for i in range(m)]

for i in range(n):
    c=0
    for j in range(m):
        
        c +=a[i][j]*b[j]
    print(c)

Solution (Python):
n,m = [int(x) for x in input().split()]
a=[]
b=[]
for i in range(n): a.append([int(x) for x in input().split()])
for j in range(m): b.append(int(input()))
for a_row in a:
    print(sum([x*y for x,y in zip(a_row,b)]))

Solution (Python):
n,m=[int(x) for x in input().split()]
a=[]
b=[]
for i in range(n): a.append([int(x) for x in input().split()])
for j in range(m): b.append(int(input()))
for a_row in a:
	print(sum([x*y for x,y in zip(a_row,b)]))

Solution (Python):
n,m=map(int,input().split())
a=[]
for i in range(n):
    a.append(list(map(int,input().split())))
b=[]
for i in range(m):
    b.append(int(input()))
for i in range(n):
    ans=0
    for j in range(m):
        ans+=a[i][j]*b[j]
    print(ans)

Solution (Python):
n, m = map(int, input().split())
a = []
b = []

for i in range(n):
    a.append(list(map(int,input().split())))
    
for i in range(m):
    b.append(list())
    b[i]=int(input())

for i in range(n):
    t=0
    for j in range(m):
        t+=a[i][j]*b[j]
    print(t)

Solution (Python):
n,m = map(int,input().split());

A = [];
for i in range(0,n):
    A += list(map(int, input().split()));

        
B = [];
for k in range(0,m):
    b = int(input());
    B.append(b);

q = 0;
for j in range(0,n):
    x = 0;
    for i in range(0,m):
        x += A[q]*B[i];
        q += 1;
    print(x);

Solution (Python):
n, m = map(int, input().split())
a = list()
for i in range(n):
	a.append(list(map(int, input().split())))
b = list()
for i in range(m):
	b.append(int(input()))
for i in range(n):
	ans = 0
	for j in range(m):
		ans += a[i][j] * b[j]
	print(ans)

Solution (Python):
n, m = map(int, input().split())

a = []
b = []

for i in range(n):
	a.append(list(map(int, input().split())))

for i in range(m):
	b.append(int(input()))

for i in range(n):
	ans = 0
	for j in range(m):
		ans += a[i][j] * b[j]
	print(ans)

Solution (Python):
n, m = map(int, input().split())
a = []

for i in range(n):
    a.append(list(map(int, input().split())))

b = []
for i in range(m):
    b.append(int(input()))

for i in range(n):
    c = 0
    for j in range(m):
        c += a[i][j] * b[j]
    print(c)

Solution (Python):
n, m = map(int, input().split())
a = [list(map(int, input().split())) for _ in range(n)]
b = [int(input()) for _ in range(m)]
ans = [0 for _ in range(n)]
for i in range(n):
    for j in range(m):
        ans[i] += a[i][j]*b[j]
print("\n".join(map(str, ans)))

Solution (Python):
n,m=map(int,input().split())
A=[]
B=[]
for i in range(n):
    A.append(list(map(int,input().split(' '))))
for j in range(m):
    b=int(input())
    B.append(b)    
for l in A:
    a=0
    i=0
    for o in l:
        a+=o*B[i]
        i+=1
    print(a)

Solution (Python):
n,m=map(int, input().split())
A=list()
b=list()
for i in range(n):
    A.append(list(map(int,input().split())))
for i in range(m):
    b.append(int(input()))
for i in range(n):
    c=0
    for j in range(m):
        c += A[i][j]*b[j]
    print(c)

Solution (Python):
n,m=map(int,input().split())
a = []
b = []
for i in range(n):
    a.append(list(map(int,input().split())))
for i in range(m):
    b.append(int(input()))
for i in range(n):
    c=0
    for j in range(m):
        c+=a[i][j]*b[j]
    print(c)

Solution (Python):
num_str = input().split()
n, m = [int(i) for i in num_str]
count = 0

Mat = []
Vec = []

for i in range(n):
    row = input().split()
    row_i = [int(i) for i in row]
    Mat.append(row_i)

for i in range(m):
    Vec.append(int(input()))

for i in range(n):
    tmp_list = [x * y for (x, y) in zip(Mat[i], Vec)]
    print(sum(tmp_list))

Solution (Python):
val =input().split(" ")
n,m =[int(i) for i in val]

a=[]
b=[]

for i in range(n):
    val1=input().split(" ")
    val2=[int(j) for j in val1]
    a.append(val2)


for i in range(m):
    b.append(int(input()))


c = int(0)


for i in range(n):
    for j in range(m):
        c += a[i][j]*b[j]
        
    print(c)
    c = 0

Solution (Python):
n,m = map(int,input().split())
a = [list(map(int,input().split())) for i in range(n)]
b = [int(input()) for i in range(m)]
for l in range(n):
  c=0
  for j in range(m):
    c+=a[l][j]*b[j]
  print(c)

Solution (Python):
n,m=map(int,input().split())
x=[]
for i in range(n):
    x.append(list(map(int,input().split())))
y=[]
for i in range(m):
    y.append(int(input()))
for i in range(n):
    s=0
    for j in range(m):
        s+=x[i][j]*y[j]
    print(s)

Solution (Python):
n,m = map(int,input().split())
a = []
b = []
for i in range(n):
	ii = list(map(int,input().split()))
	a.append(ii)
for k in range(m):
	kk = int(input())
	b.append(kk)
for s in range(n):
	ans = 0
	for ss in range(m):
		ans += a[s][ss]*b[ss]
	print(ans)

Solution (Python):
height, width = map(int, input().split())
A = []
for i in range(height):
    A.append(list(map(int, input().split())))
B = [int(input()) for s in range(width)]
C = [0 for i in range(height)]
for i in range(height):
    for j in range(width):
        C[i] += A[i][j] * B[j]
    print(C[i])

Solution (Python):
n,m=map(int,input().split())
a=list()
for i in range(n):
    a.append(list(map(int,input().split())))
b=list()
for i in range(m):
    b.append(int(input()))
for i in range(n):
    ans=0
    for j in range(m):
        ans+=a[i][j]*b[j]
    print(ans)

Solution (Python):
lst1=[]
lst2=[]
answer=0
n,m=(int(x) for x in input().split())
for s in range(n):
    aij=input().split()
    lst1.append(aij)
for t in range(m):
    bi=int(input())
    lst2.append(bi)
for u in range(n):
    lstA=lst1[u]
    for v in range(m):
        number1=int(lstA[v])
        number2=lst2[v]
        answer+=number1*number2
    print(answer)
    answer=0

Solution (Python):
n,m = map(int,input().split())
a = [list(map(int,input().split())) for _ in range(n)]
b = [int(input()) for _ in range(m)]
c = [sum([a[i][j]*b[j] for j in range(m)])for i in range(n)]
print(*c,sep='\n')

Solution (Python):
n, m = map(int, input().split())
A = []
B = []
for i in range(n):
    A.append(list(map(int, input().split())))
for i in range(m):
    B.append(int(input()))


for i in range(n):
    x = 0
    for j in range(m):
        x += A[i][j] * B[j]
    print(x)

Solution (Python):
a,b = map(int, input().split())
mat = [list(map(int, input().split())) for i in range(a)]
line = [input() for i in range(b)]

for i in range(a):
  ans = 0
  for j in range(b):
    ans = ans + mat[i][j] * int(line[j])
  print(ans)

Solution (Python):
N, M = map(int, input().split())
A = []
B = []
for n in range(N):
    a = list(map(int, input().split()))
    A.append(a)

for m in range(M):
    b = int(input())
    B.append(b)

for a in A:
    c = [unit * b for unit, b in zip(a, B)]
    print(sum(c))