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 = [[] for i in range(N)]
 
for i in range(N):
    A[i] = list(map(int,input().split()))
 
B = [[0]*1 for i in range(M)]
 
for i in range(M):
    B[i] = int(input())
 
 
for row in range(N):
    tmp = 0
    for col in range(M):
        tmp += A[row][col]*B[col]
    print("%d"%(tmp))

Solution (Python):
init=list(map(int,input().split()))
nm=[[0 for i in range(init[1])] for j in range(init[0])]
m1=[0 for i in range(init[1])]
res=[0 for i in range(init[0])]

for i in range(init[0]):
    row=list(map(int,input().split())) 
    for j in range(init[1]):
        nm[i][j]=row[j]

for i in range(init[1]):
    m1[i]=int(input())



for i in range(init[0]):
    sum=0
    for j in range(init[1]):
        sum+=nm[i][j]*m1[j]
    res[i]=sum


for i in range(init[0]):
    print(res[i])

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

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

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

B = [0 for i in range(n)]

for j in range(n):
  data = input()
  B[j] = int(data)

total = [0 for i in range(m)]

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

for i in range(m):
  print(total[i])

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

for i in range(n):
    a.append(input().split())

for j in range(m):
    b.append(input())

s=0

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

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

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

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


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

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

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

for row in range(n):
    a.append(list(map(int, input().split(' '))))
    
for ind in range(m):
    b.append(int(input()))

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

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

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

for i in range(n):
    for j in range(m):
        o.append( g[i][j]*b[j])
    ansList.append(sum(o))
    del o[:]
for ans in ansList:
    print(ans)

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

Solution (Python):
n,m = (int(i) for i in input().split())
l = 1
a = [input().split()for i in range(n)]
b = [input().split() for i in range(m)]
al = [[0 for i in range(l)]for j in range(n)]
for i in range(n):
    for j in range(m):
        al[i][l-1] += int(a[i][j]) * int(b[j][l-1])
    else:
        print(al[i][l-1])

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(list(map(lambda x, y: x*y, a[i], b))))

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):
  sum = 0
  for j in range(m):
    sum += a[i][j] * b[j]
  print(sum)

Solution (Python):
listA=[]
listB=[]
result_vec=[]
i,j=map(int,input().split())
for n in range(i):
    listA.append(list(map(int,input().split())))
for n in range(j):
    listB.append(int(input()))
for n in range(i):
    result=0
    for m in range(j):
        result+=listA[n][m]*listB[m]
    result_vec.append(result)
for n in range(i):print(result_vec[n])

Solution (Python):
def main():
    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):
        ans = 0
        for j in range(m):
            ans += a[i][j] * b[j]
        print(ans)


main()

Solution (Python):

line = input().split()
n = int(line[0])
m = int(line[1])
a = [[0 for i in range(m)] for j in range(n)]
b = [0 for i in range(m)]
ans = [0 for i in range(n)]
for i in range(n):
    a[i] = input().split()
    for j in range(m):
        a[i][j] = int(a[i][j])
for i in range(m):
    b[i] = int(input())
    
for i in range(n):
    for j in range(m):
        ans[i] += a[i][j]*b[j]
    print(ans[i])

Solution (Python):
h, w = map(int, input().split())

matrix = [list(map(int, input().split())) for _ in range(h)]
vector = [int(input()) for _ in range(w)]

for i in range(h):
    print(sum(v*m for v, m in zip(vector, matrix[i])))

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

Solution (Python):
n,m = map(int,input().split())
A = [[int(j) for j in input().split()] for i in range(n)]
b = [int(input()) for j 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):
a=list(map(int,input().split()))
matrix=[[] for i in range(a[0])]
ans=[0,]*a[0]
vector=[]
for i in range(a[0]):
    value=list(map(int,input().split()))
    for j in range(a[1]):
        matrix[i].append(value[j])
for i in range(a[1]):
    vector.append(int(input()))


for i in range(a[0]):
    for j in range(a[1]):
        ans[i]+=matrix[i][j]*vector[j]

for i in range(a[0]):
    print(str(ans[i]))

Solution (Python):
a, b = map(int, input().split())

mat = []

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

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


res = []

for i in range(a):
	tmp = 0
	for j in range(b):
		tmp += mat[i][j] * mat2[j]
	print(tmp)

Solution (Python):
numList = input().split()
n = int(numList[0])
m = int(numList[1])
a = [[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(n):
    arrayList = input().split()
    for j in range(m):
        a[i][j] = int(arrayList[j])

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

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())

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

vector = []
for x in range(m):
    vector.append(int(input()))

for x in range(n):
    ans = 0
    for y in range(m):
        ans += matrix[x][y] * vector[y]

    print(ans)

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):
    ans = 0
    for n in range(m):
        ans += a[i][n] * b[n]
    print(ans)

Solution (Python):
n, m = map(int, input().split())
a = [[0] * m for i in range(n)]
b = [0] * m
for i in range(n):
	a[i] = list(map(int, input().split()))
for j in range(m):
	b[j] = 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 = []
b = []
c = []
for i in range(n):
    A.append(list(map(int, input().split())))
for j in range(m):
    b.append(int(input()))
for k in range(n):
    s = 0
    for l in range(m):
        s += A[k][l] * b[l]
    c.append(s)
for k in range(n):
    print(c[k])

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

A = [[0 for am in range(m)] for an in range(n)]
for xn in range(n):
    Anm = [int(x) for x in input().split()]
    for xm in range(m):
        A[xn][xm] = Anm[xm]

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

for ansn in range(n):
    ans = 0
    for ansm in range(m):
        ans += A[ansn][ansm] * b[ansm]
    print (ans)

Solution (Python):
i,j = map(int,input().split())
a = [[] for x in range(i)]
for x in range(i):
    a[x] = list(map(int,input().split()))
b = [[0]*1 for x in range(j)]
for x in range(j):
    b[x] = int(input())

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

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

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

Solution (Python):
num1, num2 = map(int, input().split())
matrix = []

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

column = []
for j in range(num2):
    m = int(input())
    column.append(m)

for k in range(num1):
    a = 0
    for l in range(num2):
        a += matrix[k][l]*column[l]
    print(a)

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

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):print(sum([a[i][j]*b[j] for j in range(m)]))

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


matrix = [[0]*m for i in range(n)]
mtx = []

for i in range(n):
    mtx = input().split()
    for j in range(m):
        matrix[i][j] = int(mtx[j])

vector =[0]*m

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

answer = [0]*n
    
for b in range(n):
    for c in range(m):
        answer[b] += matrix[b][c] * vector[c]
    print(answer[b])

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

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


B = [int(input()) for j in range(m)]


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

Solution (Python):
N,M = map(int,input().split())
L = []
for i in range(N) :
    L.append(list(map(int,input().split())))
v = []
for i in range(M) :
    v.append(int(input()))

ans = []
for i in range(N) :
    element = 0
    for j in range(M) :
        element += L[i][j]*v[j]
    ans.append(element)
for i in range(len(ans)) :
    print(ans[i])

Solution (Python):
nm = [int(s) for s in input().split()]
A = []
for i in range(nm[0]):
    a_i = [int(s) for s in input().split()]
    A.append(a_i)
b = []
for j in range(nm[1]):
    b_j = int(input())
    b.append(b_j)

for i in range(nm[0]):
    c_i = 0
    for j in range(nm[1]):
        c_i += A[i][j] * b[j]
    print(c_i)

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

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

Solution (Python):
import sys

n, m = map(int, sys.stdin.readline().strip().split())

mat = []

for _ in range(n):
    mat.append(list(map(int, sys.stdin.readline().strip().split())))

vec = []

for _ in range(m):
    vec.append(int(sys.stdin.readline()))

for i in range(n):
    print(sum(mat[i][j] * vec[j] for j in range(m)))

Solution (Python):
num = input()
lst1 = list(map(int, num.split()))
n = lst1[0]
m = lst1[1]
lst2 = []
lst3 = []
s = 0
for i in range(n):
    line = input()
    lst2.append(list(map(int, line.split())))

for i in range(m):
    line = input()
    lst3.append(list(map(int, line.split())))

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

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




for row in v_li:
    mul = 0
    for col in range(m):
        mul+=row[col]*b[col]
    print(mul)

Solution (Python):
import sys
n, m=map(int,sys.stdin.readline().split())
A=[list(map(int,sys.stdin.readline().split())) for i in range(n)]
B=[list(map(int,sys.stdin.readline().split())) for i in range(m)]
C=[[0 for C in range(m)] for r in range(n)]
for r in range(n):
    for c in range(m):
        C[r][0]+=A[r][c]*B[c][0]
    print(C[r][0])

Solution (Python):
n, m = map(int, input().split())
arr1 = [list(map(int, input().split())) for _ in range(n)]
arr2 = [int(input()) for _ in range(m)]
for ans in ([sum([a1*a2 for a1,a2 in zip(arr1[j], arr2)]) for j in range(n)]):
    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):
def main():
	n, m = (int(a) for a in input().split())
	a = []
	b = []
	for i in range(n):
		for j in input().split():
			a.append(int(j))
	for i in range(m):
		b.append(int(input()))

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

main()

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):
matlix=list(map(int,input().split()))
n=matlix[0]
m=matlix[1]

A=[]
b=[]
C=[]
c=0

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):
    for j in range(m):
        c=c+A[i][j]*b[j]
    print(c)
    c=0

Solution (Python):

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

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

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

c = [0 for i in range(n)]
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):

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

l = []
for i in range(0,m):
    l.append(list(map(int,input().split())))

l2 = []
for i in range(0,n):
    l2.append(int(input()))


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

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

Solution (Python):
n, m = map(int, input().split())
a = [[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(n):
    a[i] = list(map(int, input().split()))
for j in range(m):
    b[j] = 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())

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

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

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

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):
    answer = [aj*bj for aj, bj in zip(a[i], b)]
    print(sum(answer))

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

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

for n_l in n_list:
    sum_n = 0
    for i in range(len(n_l)):
        sum_n += n_l[i]*m_list[i]
    print(sum_n)

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

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

for i in range(n):
    temp = input()
    sp = temp.split(' ')
    
    for j in range(m):
        a[i][j] = int(sp[j])

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

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

Solution (Python):
(n,m)=map(int, input().split())
matrix = [[0]*m for x in range(n)]
vector = [0]*m
ans = [0]*n

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

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

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

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

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 a, b in zip(A[i], B):
        ans += (a * b)
    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):
    bi = 0
    for j in range(m):
        bi += A[i][j] * b[j]
    print(bi)

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):
    c = 0
    for j in range(m):
        c += a[i][j]*b[j]
    print(c)

Solution (Python):
num_nm=list(map(int,input().split()))
A=[[0 for iA in range(num_nm[0])]for jA in range(num_nm[1])]
b=[0 for ib in range(num_nm[1])]
for i in range(num_nm[0]):
	num_A=list(map(int,input().split()))
	for j in range(num_nm[1]):
		A[j][i]=num_A[j]
for k in range(num_nm[1]):
	num_b=int(input())
	b[k]=num_b
for l in range(num_nm[0]):
	ans_1=0
	for m in range(num_nm[1]):
		ans_1=ans_1+A[m][l]*b[m]
	print(ans_1)

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

matrix = []
vector = []

for i in range(nxm[0]):
    matrix.append(list(map(int,input().split())))
    
for k in range(nxm[1]):
    vector.append(int(input()))
    

for n in range(nxm[0]):
    ans = 0
    for m in range(nxm[1]):
        ans += matrix[n][m]*vector[m]       
    print(ans)

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

A = []
b = []
result  = []

for i in range(0, n):
    A.append(input().split())
for i in range(0, m):
    b.append(input())

for i in range(0, n):
    temp = 0
    for j in range(0, m):
        temp += int(A[i][j]) * int(b[j])
    result.append(temp)

for i in result:
    print(i)

Solution (Python):

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


a = [[] for i in range (0,n)]
b = [[0]*1 for i in range (0,m)]

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

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


for i4 in range(n):
    tmp = 0
    for i5 in range(m):
        tmp += a[i4][i5]*b[i5]
    print(tmp)

Solution (Python):





matrix=list()
col=list()
y,x=map(int,input().split())

for _ in range(y):
    matrix.append(list(map(int,input().split())))

for _ in range(x):
    col.append(int(input()))

for j in range(y):
    result=0
    for i in range(x):
        result+=matrix[j][i]*col[i]
    print(result)

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

ans = [sum([a[i]*b[i] for i in range(len(b))]) for a in A]
for xj in ans:
    print(xj)

Solution (Python):
r,c=map(int,input().split())
A=[ list(map(int,input().split())) for i in range(r) ]
B=[ list(map(int,input().split())) for i in range(c) ]
C=[ [0] for i in range(r) ]
for i in range(r):
	for j in range(c):
		C[i][0]+=A[i][j]*B[j][0]
for i in range(r):
	print(str(C[i][0]))

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

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

for i in range(m):
    b.append(list(map(int, input().split())))

for i in range(n):
    c = 0
    for j in range(m):
        c += a[i][j] * b[j][0]
    print(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)]

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

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):
    ans = 0
    for j in range(m):
        ans += A[i][j] * b[j]
    print(ans)

Solution (Python):
BIG_NUM = 2000000000
MOD = 1000000007
EPS = 0.000000001

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 = [[0]*1 for i in range(M)]

for i in range(M):
    B[i] = int(input())


for row in range(N):
    tmp = 0
    for col in range(M):
        tmp += A[row][col]*B[col]
    print("%d"%(tmp))

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):
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 i in range(n)]
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):
dim = input().split()
m = int(dim[0])
n = int(dim[1])
matrix = [input().split() for i in range(m)]
vector = [int(input()) for i in range(n)]
for i in range(m):
    result = 0
    for j in range(n):
        result += int(matrix[i][j]) * vector[j]
    print(result)

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

for i in range(m):
    sum = 0
    for k in range(n):
            c_ij = M[i][k]*N[k]
            sum = sum + c_ij
    print(sum)

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 = [ 0 for _ in range(n)]


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):
h, w = [int(i) for i in input().split()]
A = [0] * h
for i in range(h):
    A[i] = [int(j) for j in input().split()]
b = []
for i in range(w):
    b.append(int(input()))
for i in range(h):
    num = 0
    for j in range(w):
        num += A[i][j] * b[j]
    print(num)

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 = [0 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):


if __name__ == '__main__':
    n, m = map(int, raw_input().split())

    A = [map(int, raw_input().split()) for _ in range(n)]
    B = [[int(raw_input())] for _ in range(m)]

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

Solution (Python):
n, m = list(map(int, input().split()))
A = [[0]*m for _ in range(n)]
B = [0]*m
for i in range(n):
  a = list(map(int, input().split()))
  for j in range(m):
    A[i][j] = a[j]
for i in range(m):
  B[i] = 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, tuple(input().split(' ')))
a = [[int(s) for s in input().split(' ')] for _ in range(n)]
b = [int(input()) for i in range(m)]
for i in range(n):
	ci = 0
	for j in range(m): ci += a[i][j] * b[j]
	print(ci)

Solution (Python):
arg1,arg2 = map(int, input().split())
data = []
data2 = []
tmp = []
for x in range(0,arg1):
    tmp = input().split()
    data.append([int(tmp[i]) for i in range(arg2)])
for x in range(0,arg2):
    data2.append(int(input()))
for x in range(0,arg1):
    sum = 0
    for y in range(0,arg2):
        sum = sum + data[x][y] * data2[y]
    print(sum)