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_matrix = [list(map(int, input().split())) for row in range(n)] 
b_matrix = [int(input()) for row in range(m)] 

for i in range(n):
	combined = [a * b for (a, b) in zip(a_matrix[i], b_matrix)]
	result = 0
	for x in combined:
		result += x
	print(result)

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

for i in range(n):
    for j in range(m):
        ans[i] += mat[i][j]*vec[j]

for k in ans :
    print(k)

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

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

a = [[int(j) for j in input().split()] for i in range(n)]
b = [int(input()) for i in range(m)]
c = [0]*m

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

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

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

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

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

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

for i in range(n):
        A.append(map(int, raw_input().split()))
for i in range(m):
        B.append(input())

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

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

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

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

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

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

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

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

Solution (Python):
x, y = [int(i) for i in input().split()]
date = [[int(i) for i in input().split()]for i in range(1,x+1)]
date2 =[int(input())for i in range(1,y+1)]
date3 =[]
for a in range(0,x):
    for b in range(0,y,):
        date3 += [date2[b]*date[a][b]]
for d in range(0,len(date3),y):
    print(sum(date3[d:d+y]))

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

matrix = []
for ni in range(n):
    matrix.append([int(a) for a in input().split()])

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

b = []
for ni in range(n):
    sum = 0
    for mi in range(m):
        sum += matrix[ni][mi] * vector[mi]

    print(sum)

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

matrix = []
for ni in range(n):
    matrix.append([int(a)for a in input().split()])

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

for ni in range(n):

    sum = 0
    for mi in range(m):
        sum += matrix[ni][mi] * vector[mi]

    print(sum)

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

matrix = []
for ni in range(n):
    matrix.append([int(a) for a in input().split()])

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

for ni in range(n):
    sum = 0
    for mi in range(m):
        sum += matrix[ni][mi] * vector[mi]

    print(sum)

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

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

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

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

for ind in range(n):
	print(c[ind])

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

matrix = []
for ni in range(n):
    matrix.append([int(a) for a in input().split()])

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

for ni in range(n):
    sum = 0
    for mi in range(m):
        sum += matrix[ni][mi] * vector[mi]

    print(sum)

Solution (Python):
(n, m) = [int(i) for i in 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(s)

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

matrix = []
for ni in range(n):
    matrix.append([int(a) for a in input().split()])

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

b = []
for ni in range(n):
    sum = 0
    for mi in range(m):
        sum += matrix[ni][mi] * vector[mi]

    print(sum)

Solution (Python):
n, m = [int(i) for i in input().split()]
 
matrix = []
for ni in range(n):
    matrix.append([int(a) for a in input().split()])
 
vector = []
for mi in range(m):
    vector.append(int(input()))
 
for ni in range(n):
    sum = 0
    for mi in range(m):
        sum += matrix[ni][mi] * vector[mi]
 
    print(sum)

Solution (Python):

n, m = [int(i) for i in input().split()]
 
matrix = []
for ni in range(n):
    matrix.append([int(a) for a in input().split()])
 
vector = []
for mi in range(m):
    vector.append(int(input()))
 
for ni in range(n):
    sum = 0
    for mi in range(m):
        sum += matrix[ni][mi] * vector[mi]
 
    print(sum)

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

matrix = []
for ni in range(n):
   matrix.append([int(a) for a in input().split()])
   
vector = []
for mi in range(m):
    vector.append(int(input()))

b = []
for ni in range(n):
    sum = 0
    for mi in range(m):
       sum += matrix[ni][mi] * vector[mi]
    
    print(sum)

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

matrix = []
for ni in range(n):
    matrix.append([int(a) for a in input().split()])

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

b = []
for ni in range(n):
    sum = 0
    for mi in range(m):
        sum += matrix[ni][mi] * vector[mi]

    print(sum)

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

matrix = []
for ni in range(n):
    matrix.append([int(a) for a in input().split()])

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

for ni in range(n):
    sum = 0
    for mi in range(m):
        sum += matrix[ni][mi] * vector[mi]

    print(sum)

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

matrix = []
for ni in range(n):
    matrix.append([int(a) for a in input().split()])

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



for ni in range(n):
    sum = 0
    for mi in range(m):
        sum += matrix[ni][mi] * vector[mi]


    print(sum)

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

Solution (Python):
n, m = [int(i) for i in input().split()]
 
matrix = []
for ni in range(n):
    matrix.append([int(a) for a in input().split()])
 
vector = []
for mi in range(m):
    vector.append(int(input()))
 
b = []
for ni in range(n):
    sum = 0
    for mi in range(m):
        sum += matrix[ni][mi] * vector[mi]
 
    print(sum)

Solution (Python):
n, m = [int(i) for i in input().split()]
  
matrix = []
for ni in range(n):
    matrix.append([int(a) for a in input().split()])
  
vector = []
for mi in range(m):
    vector.append(int(input()))
  
b = []
for ni in range(n):
    sum = 0
    for mi in range(m):
        sum += matrix[ni][mi] * vector[mi]
  
    print(sum)

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

matrix = []
for ni in range(n):
    matrix.append([int(a) for a in input().split()])

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


b = []
for ni in range(n):
    sum = 0
    for mi in range(m):
        sum += matrix[ni][mi] * vector[mi]

    print(sum)

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

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

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

for i in c:
    print(i)

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

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

for i in c:
    print(i)

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

for i in range(n):
    c[i] = sum([a[i][x] * b[x] for x in range(m)])

for i in c:
    print(i)

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

Solution (Python):


n, m = map(int, raw_input().split())
t = [0] * m
mx = t * n
for i in xrange(n):
	mx[i] = map(int, raw_input().split())

v = [0] * m
for i in xrange(m):
	v[i] = input()

for i in xrange(n):
	t = 0
	for j in xrange(m):
		t += mx[i][j] * v[j]
	print t

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

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

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

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

for i in range(n):
    print(out[i])

Solution (Python):
n, m = map(int, raw_input().split())
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):
    temp = map(int, raw_input().split())
    for j in range(m):
        A[i][j] += temp[j]
for i in range(m):
    b[i] = int(raw_input())
    
for i in range(n):
    for j in range(m):
        ans[i] += A[i][j]*b[j]
        
for i in range(n):
    print ans[i]

Solution (Python):

import sys


def read_data():
    n, m = [int(i) for i in sys.stdin.readline().strip().split(' ')]
    matrix = []
    for _ in range(n):
        matrix.append([int(num) for num in sys.stdin.readline().strip().split(' ')])

    vector = []
    for _ in range(m):
        vector.append(int(sys.stdin.readline().strip()))

    return matrix, vector


def multiple(matrix, vector):
    n = len(matrix)
    m = len(vector)
    ans = []

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

        ans.append(sum)

    return ans


def main():
    matrix, vector = read_data()
    ans = multiple(matrix, vector)
    for i in ans:
        print(i)
        
if __name__ == '__main__':
    main()

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

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

i = 0
while i < n:
    l = list(map(int, input().split()))
    A[i] = l
    i += 1

i = 0
while i < m:
    l = int(input())
    b[i] = l
    i += 1

i = 0
j = 0
while i < n:
    while j < m:
        c[i] += A[i][j] * b[j]
        j += 1
    i += 1
    j = 0

for i in c:
    print(i)

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

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

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

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


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

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

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

Solution (Python):
n, m = map(int, input().split())
matrix = []
vector = []
for _ in range(n):
    matrix.append(map(int, input().split()))
for _ in range(m):
    vector.append(int(input()))
for row in matrix:
    product = 0
    for i, e in enumerate(row):
        product += e * vector[i]
    print(product)

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

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

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

Solution (Python):
n, m = list(map(int, input().split()))
matrix_a = [list(map(int, input().split())) for i in range(n)]
matrix_b = [int(input()) for i in range(m)]
for i in range(n):
    print(sum([x*y for (x,y) in zip(matrix_b,matrix_a[i])]))

Solution (Python):

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

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

for j in range(m):
    b.append(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]

for i in ans:
    print(i)

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()]
a = []
for _ in range(n):
  a.append([int(_) for _ in input().split()])
b = []
for _ in range(m):
  b.append(int(input()))

for ai in a:
  print(sum([a_c * b_c for a_c, b_c in zip(ai, b)]))

Solution (Python):
[n, m] = [int(x) for x in raw_input().split()]
A = [[0] * m for x in range(n)]
B = [0] * m
counter = 0
while counter < n:
    A[counter] = [int(x) for x in raw_input().split()]
    counter += 1

counter = 0
while counter < m:
    B[counter] = int(raw_input())
    counter += 1

counter = 0
while counter < n:
    result = 0
    for j in range(m):
        result += A[counter][j] * B[j]
    print(result)
    counter += 1

Solution (Python):
[n, m] = [int(x) for x in raw_input().split()]
A = []

counter = 0
while counter < n:
    A.append([int(x) for x in raw_input().split()])
    counter += 1

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

counter = 0
while counter < n:
    result = 0
    for j in range(m):
        result += A[counter][j] * B[j]
    print(result)
    counter += 1

Solution (Python):
n, m = [int (x) for x in 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 s in range(0,n):
    a[s] = [int (x) for x in input().split(' ')]
for s in range(0,m):
    b[s] = int(input())
for s in range(0,n):
    for t in range(0,m):
        c[s] += a[s][t] * b[t]
for t in range(0,n):
    print("%d" % c[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)]
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 = [[] for x in range(0, n)]
b = [0 for x in range(0, m)]
for x in range(0, n):
    a[x] = list(map(int, input().split()))
for x in range(0, m):
    b[x] = int(input())
for i in range(0, n):
    c = 0
    for j in range(0, m):
        c += a[i][j] * b[j]
    print(c)

Solution (Python):
if __name__ == '__main__':
    
    matrix = []
    matrix_size = [int(x) for x in input().split(' ')]
    for i in range(matrix_size[0]):
        matrix.append([int(x) for x in input().split(' ')])

    
    vector_b = []
    for i in range(matrix_size[1]):
        vector_b.append(int(input()))

    
    result = []
    for i in range(matrix_size[0]):
        row = []
        for x, y in zip(matrix[i], vector_b):
            row.append(x*y)
        result.append(row)

    
    for r in result:
        print(sum(r))

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

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

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

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

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=list(map(int,input().split()))
mat=[]
for i in range(n):
	mat.append(list(map(int,input().split())))

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

res=[]
for i in range(n):
	c=0
	for j in range(m):
		c+=mat[i][j]*vec[j]
	res.append(c)
for i in res:
	print(i)

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

Solution (Python):


N, M = map(int, input().split())

A = []
b = []

for _ in range(N):
    A.append([int(i) for i in input().split()])
    
for _ in range(M):
    b.append(int(input()))
    
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())

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

for v in v1:
    print( sum([ v[i] * v2[i] for i in range(m) ]))

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

v1 = [ map(int,input().split()) for i in range(n) ]
v2 = [ int(input()) for i in range(m) ]

for v in v1:
    print(sum(map(lambda x,y:x*y,v,v2)))

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

v1 = [ map(int,input().split()) for i in range(n) ]
v2 = [ int(input()) for i in range(m) ]

for v in v1:
    print(sum(map(lambda x,y:x*y,v,v2)))

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

v1 = [ input().split() for i in range(n) ]
v2 = [ int(input()) for i in range(m) ]

for v in v1:
    print(sum(map(lambda x,y:int(x)*y,v,v2)))

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

v1 = [ input().split() for i in range(n) ]
v2 = [ int(input()) for i in range(m) ]

for v in v1:
    print(sum(map(lambda x,y:int(x)*y,v,v2)))

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

v1 = [ input().split() for _ in range(n) ]
v2 = [ int(input()) for _ in range(m) ]

for v in v1:
    print(sum(map(lambda x,y:int(x)*y,v,v2)))

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

v1 = [ input().split() for _ in range(n) ]
v2 = [ int(input()) for _ in range(m) ]

l = [sum(map(lambda x,y:int(x)*y,v,v2)) for v in v1 ]

print(*l,sep="\n")

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

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

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

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

a = [0]*n
b = [0]*m
c = [0]*n

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

Solution (Python):
A = []
b = []

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

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):
    print(sum([x*y for x,y in zip(A[i],b)]))

Solution (Python):
A = list()
b = list()

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

for i in range(n):
    A.append(list())
    A[i] = [int(x) for x in input().split(" ")]

for i in range(m):
    b.append(list())
    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().strip().split())
a = [[0 for j in range(m)] for i in range(n)]
b = [[0] for j in range(m)]
c = [[0] for j in range(n)]

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

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


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

Solution (Python):
row, col = map(int,input().split())

mat = [[0 for i2 in range(col)] for i1 in range(row)]
for i in range(row):
    mat[i] = list(map(float,input().split()))
vec = [0 for i in range(col)]
for i in range(col):
       vec[i] = float(input())

result = [0 for i in range(row)]
for i in range(row):
    for j in range(col):
        result[i] += mat[i][j]*vec[j]

for i in range(len(result)):
    print(int(result[i]))

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

matrix = [[int(i) for i in input().split()] for gyo in range(n)]
vector = [[int(i) for i in input().split()] for gyo in range(m)]

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


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


for i in range(len(ans)):
    print(ans[i])

Solution (Python):
'''
ITP-1_6-D
 ??????????????¨????????????
n??mn??m  ????????? AA ??¨???m??1m??1 ??????????????????bb ??????????????????AA ??¨ bb ?????????????????????????????°????????????????????????????????????

?¬????????????? mm ????????°??????????????????????????? m??1m??1????????????????????¨???????????????

b=??????????????????b1b2:bm??????????????????
b=(b1b2:bm)
?¬????????????? nn ????????°??????????????????????????? mm ????¨?????????????????????? n??mn??m ???????????¨???????????????

A=??????????????????a11a21:an1a12a22:an2......:...a1ma2m:anm??????????????????
A=(a11a12...a1ma21a22...a2m::::an1an2...anm)
??????????????????????????????????????????????????°????????¨???????´???¨?????????m??1m??1 ?????????????????? bb ???????????? ii ?????????????´???? bi(i=1,2,...,m)bi(i=1,2,...,m)???n??mn??m ????????? AA ?????? n??mn??m ??????????´????????????????ii ??? jj ?????????????´???? aij(i=1,2,...,n,j=1,2,...,m)aij(i=1,2,...,n,j=1,2,...,m)??§??????????????????

n??mn??m????????? AA ??¨m??1m??1?????????????????? bb ????????????n??1n??1?????????????????? cc ??¨?????????cc ??? ii ?????????????´? cici ????¬?????????§??????????????????

ci=???j=1maijbj=ai1b1+ai2b2+...+aimbm
???Input
???????????? nn ??¨ mm ????????????????????§??????????????????????¶???? nn ???????????? AA ???????´? aijaij ???
?????????????????§??????????????????????¶???? mm ?????????????????? bb ???????´? bibi ?????????????????????????????????????????????
???Output
????????? nn ???????????????????????????????????? cc ???????´? cici ???????????????????????????????????????????????????
'''
n, m = [int(cnt0) for cnt0 in input().split()]
matrixData = []
for i in range(n):
    
    matrixData.append([int(cnt1) for cnt1 in input().split()])
    
vector = []
for cnt2 in range(m):
    vector.append(int(input()))
    
for cnt3 in range(n):
    outputValue = 0
    for cnt4 in range(m):
        outputValue += ((matrixData[cnt3][cnt4]) * (vector[cnt4]))
    print(outputValue)

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

A = []
b = []

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

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

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

for i in range(n):
    print(c[i])

Solution (Python):
import sys

lines = [line for line in sys.stdin]

n,m = map(int,lines[0].split())

A=[map(int,lines[1+r].split()) for r in range(n)]
b=[int(lines[1+n+r]) for r in range(m)]

ab = []
for r in A:
    ab.append(0)
    for (a,c) in zip(r,b):
        ab[-1] += a*c

for i in ab:
    print (i)

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):
    a[i] = list(map(int,input().split()))

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]
    print(c[i])

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):
import sys

def input_number():
    for i in range(n):
        adding=map(int,raw_input().split())
        A.append(adding)
    for i in range(m):
        adding=input()
        b.append(adding)

if __name__ == '__main__':
    n,m=map(int,raw_input().split())
    A=[]
    b=[]
    ans=[0 for i in range(n)]
    input_number()
    for i in range(n):
        for j in range(m):
            ans[i] += A[i][j] * b[j]
    for i in range(n):
        print ans[i]

Solution (Python):


import sys


def main():
    m, n = [int(col_row) for col_row in sys.stdin.readline().split()]
    matrix = [[0 for col in range(n)] for row in range(m)]
    vector = [0 for row in range(n)]

    for row in range(m):
        lst = [int(element) for element in sys.stdin.readline().split()]
        for col in range(n):
            matrix[row][col] += lst[col]

    for row in range(n):
        lst = [int(element) for element in sys.stdin.readline().split()]
        vector[row] += lst[0]

    for row in range(m):
        sum_of_row = 0
        for col in range(n):
            sum_of_row += matrix[row][col] * vector[col]
        print(sum_of_row)


if __name__ == '__main__':
    main()

Solution (Python):


import sys


def init_matrix_vector():
    m, n = [int(col_row) for col_row in sys.stdin.readline().split()]
    matrix = [[0 for col in range(n)] for row in range(m)]
    vector = [0 for row in range(n)]

    for row in range(m):
        lst = [int(element) for element in sys.stdin.readline().split()]
        for col in range(n):
            matrix[row][col] += lst[col]

    for row in range(n):
        lst = [int(element) for element in sys.stdin.readline().split()]
        vector[row] += lst[0]

    return matrix, vector


def print_matrix_vector_multiplication_result(matrix, vector):
    for row in range(len(matrix)):
        sum_of_row = 0
        for col in range(len(vector)):
            sum_of_row += matrix[row][col] * vector[col]
        print(sum_of_row)


def main():
    matrix, vector = init_matrix_vector()
    print_matrix_vector_multiplication_result(matrix, vector)


if __name__ == '__main__':
    main()

Solution (Python):
import sys


fin = sys.stdin

n, m = map(int, fin.readline().split())

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

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

for i in range(m):
	b[i] = int(fin.readline())

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

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

Mat = []

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

b = []

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

c = [0 for k in range(n)]

for l in range(n):
	for l2 in range(m):
		c[l] += (Mat[l][l2] * b[l2])
	print(c[l])

Solution (Python):
n,m = map(int,input().split())
A = []
for i in range(n):
    a = [int(j) for j in input().split()]
    A.append(a)
b = []
count = 0
while count < m:
    b.append(int(input()))
    count += 1


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 =[[int(i) for i in input().split()] for j in range(n)]
b = []
for i in range(m):
    b.append(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]
for i in ans:
    print(i)

Solution (Python):
def matrics_vector_multiply(l1, l2):
    """
    l1: a list(matrics n*m)
    l2: a list(vector  m*1)
    returns a list(vector n*1)

    >>> matrics_vector_multiply([[2]], [0])
    [0]
    >>> matrics_vector_multiply([[1,2,0,1],[0,3,0,1],[4,1,1,0]], [1,2,3,0])
    [5, 6, 9]
    """
    result = []
    for row in l1:
        c = 0
        for i in range(len(row)):
            c += row[i] * l2[i]
        result.append(c)

    return result

if __name__ == '__main__':

    (row, col) = [int(i) for i in input().split(' ')]
    m = []
    v = []
    for r in range(row):
        elms = [int(i) for i in input().split(' ')]
        m.append(elms)
    
    for c in range(col):
        v.append(int(input()))

    for elm in matrics_vector_multiply(m, v):
        print(str(elm))