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):
if __name__ == "__main__":

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

    b = [0] * m
    A = [0] * m * n

    for i in xrange(n):
        A[i*m:i*m+m] = map( int, raw_input().split())

    for i in xrange(m):
        b[i] = int(raw_input())

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

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

Solution (Python):


A = []
n, m = map(int, raw_input().split())
for _ in xrange(n):
    A.append(map(int, raw_input().split()))


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


Ab = [sum([A[i][j] * b[j] for j in xrange(m)]) for i in xrange(n)]

for x in Ab:
    print x

Solution (Python):


n, m = map(int, raw_input().split())
A = [map(int, raw_input().split()) for _ in xrange(n)]
b = [input() for _ in xrange(m)]
Ab = [sum([A[i][j] * b[j] for j in xrange(m)]) for i in xrange(n)]
for x in Ab:
    print x

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

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

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

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

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

c =[]
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())
rc = [list(map(int,input().split())) for i in range(n)]
vector = [int(input()) for i in range(m)]
[print(sum([j*k for j,k in zip(rc[i],vector)])) for i in range(n)]

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

i = 0
vec_a = []
while i < n:
  line = map(int, raw_input().split(" "))
  vec_a.append(line)
  i += 1
i = 0
vec_b = []
while i < m:
  line = int(raw_input())
  vec_b.append(line)
  i += 1



vec_c = []
for i in vec_a:
  sum = 0
  for j in xrange(m):
    sum += i[j] * vec_b[j]
  vec_c.append(sum)

for i in vec_c:
  print i

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

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):
if __name__ == '__main__':
    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)]
    c = [sum(map(lambda x,y: x*y, A[i], b)) for i in range(n)]
    print('\n'.join([str(i) for i in c]))

Solution (Python):
n,m=map(int,raw_input().split())
A,B=[],[]
c=0
for i in xrange(n):
	A.append(map(int,raw_input().split()))
for i in xrange(m):
	B.append(int(raw_input()))
for i in xrange(n):
	for j in xrange(m):
		c+=A[i][j]*B[j]
	print c
	c=0

Solution (Python):
n,m=map(int,raw_input().split())
A,B=[],[]
c=0
A=[map(int,raw_input().split()) for _ in [0]*n]
B=[int(raw_input()) for _ in [0]*m]
for i in xrange(n):
	print sum([A[i][j]*B[j] for j in xrange(m)])

Solution (Python):
k = list(map(int, input().split()))
n = k[ 0 ]
m = k[ 1 ]

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

for i in range ( n ) :
    answerPerRow = 0
    for j in range ( m ) :
        answerPerRow += bigArray[ i ][ j ] * smallArray[ j ]
    print( answerPerRow )

Solution (Python):
n, m = map(int, raw_input().split())
a = []
for i in range(n):
    a.append(map(int, raw_input().split()))
b = [input() for j in range (m)]
c = 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) = [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 = map(int, raw_input().split())
matrix = []
array = []
for n in range(N):
    tmp = map(int, raw_input().split())
    if len(tmp) > M:
        print 'error'
    matrix.append(tmp)

for m in range(M):
    tmp = input()
    array.append(tmp)

for n in range(N):
    multi = 0
    for m in range(M):
        multi += matrix[n][m] * array[m]
    print multi

Solution (Python):
N, M = map(int, raw_input().split())
matrix = [map(int, raw_input().split()) for n in range(N)]
array = [input() for m in range(M)]

for n in range(N):
    c = 0
    for m in range(M):
        c += matrix[n][m] * array[m]
    print c

Solution (Python):
k = list(map(int, input().split()))
n = k[ 0 ]
m = k[ 1 ]

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

for i in range ( n ) :
    answerPerRow = 0
    for j in range ( m ) :
        answerPerRow += bigArray[ i ][ j ] * smallArray[ j ]
    print( answerPerRow )

Solution (Python):
nm = list(map(int, input().split(" ")))
n = nm[0]
m = nm[1]

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

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

for i in range(n):
    c_i = sum([matrix_A[i][j] * vector_b[j] for j in range(m)])
    print(c_i)

Solution (Python):
import sys

n,m=map(int,raw_input().split())
list1 = [[0 for i in range(m)]for i in range(n)]
list2 = [[0 for i in range(1)]for i in range(m)]
list3 = [[0 for i in range(1)]for i in range(n)]
for i in range(n):
	list1[i] = map(int,raw_input().split())
for i in range(m):
	list2[i] = map(int,raw_input().split())
for i in range(n):
	for j in range(1):
		for k in range(m):
			list3[i][j] += list1[i][k] * list2[k][j]
for i in range(n):
	for j in range(1):
			print'%d' %list3[i][j]

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

a = []
b = []

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

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

c = []

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

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.append(int(input()))

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

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

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

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

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

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

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


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


for row in range(n):
    p = 0
    for i, j in zip(A[row], b):
        p += i * j
    print(p)

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

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

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

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

Solution (Python):



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

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

vector = [0] * m
for j in range(m):
    vector[j] = int(input())

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

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

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

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

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

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

for row in A:
    s = 0
    for i, elm in enumerate(row):
        s += (elm*b[i])
    print(s)

Solution (Python):
from operator import mul

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

for ai in a:
    print(sum(map(mul, ai, b)))

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

for i in range(n):
    matrix.append([int(x) for x in input().split()])
for i in range(m):
    vector.append(int(input()))

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

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

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

B = [0 for i in xrange(m)]

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

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

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

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

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

Solution (Python):
a,b  = map(int, raw_input().split())
A = [map(int, raw_input().split()) for _ in xrange(a)]
B = [input() for _ in xrange(b)]
C = [sum([A[i][j] * B[j] for j in xrange(b)]) for i in xrange(a)]
for x in C:
    print x

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

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

for i in xrange(n):
    tmp = map(int, raw_input().split())
    for j in xrange(m):
        a[i][j] = tmp[j]
for k in xrange(m):
    b[k] = int(raw_input())

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

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

A = [[0 for q in range(m)] for w in range(n)]
B = [0 for e 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 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 , raw_input().split() )
A = []
b = []
 
for i in range(n):
  A += [ map( int , raw_input().split() ) ]
for j in range(m):
  b += [ 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, raw_input().split())
 
a = [[0 for i in xrange(m)] for j in xrange(n)]
b = [0 for i in xrange(m)]
 
for i in xrange(n):
    tmp = map(int, raw_input().split())
    for j in xrange(m):
       a[i][j] = tmp[j]
for k in xrange(m):
    b[k] = int(raw_input())
 
for i in xrange(n):
    ans = 0
    for j in xrange(m):
        ans += a[i][j]*b[j]
    print ans

Solution (Python):
n, m = map(int, raw_input().split());
i = 0
ar = [0] * n
vc = [0] * m
while i < n:
    ar[i] = map(int, raw_input().split());
    i += 1
i = 0
while i < m:
    vc[i] = input();
    i += 1
for el in ar:
    ans = 0
    for el2, el3 in zip(vc, el):
        ans += el2 * el3
    print ans

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

A = [[0 for j in range(M)]for i in range(N)]
B = [0 for j in range(M)]
C = [0 for i in range(N)]


for i in range(N):
    Ai = map(int, raw_input().split())
    for j in range(M):
        A[i][j] = Ai[j]

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


for i in range(N):
    for j in range(M):
        C[i] = C[i] + A[i][j]*B[j]

for i in range(N):
    print C[i]

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

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

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

Solution (Python):
n, m = map(int, raw_input().split())
A = [None] * n
for i in xrange(n):
    A[i] = map(int, raw_input().split())
b = [None] * m
for j in xrange(m):
    b[j] = input()

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

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

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

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

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

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

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

Solution (Python):
row , col = [int(x) for x in input().split()]
A = [0] * row

for i in range(row):
    A[i] = [int(x) for x in input().split()]
B = []
for i in range(col):
    B.append(int(input()))

for i in range(row):
    s = 0
    for j in range(col):
        s += A[i][j] * B[j]
    print(s)

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

Matrix = [[0 for j in range(m)]for i in range(n)]
Vector = [0 for i in range(m)]
Ans = [0 for i in range(n)]

for i in range(n):
    M_element = map(int, raw_input().split())
    for j in range(m):
        Matrix[i][j] = M_element[j]

for i in range(m):
    Vector[i] = int(raw_input())

for i in range(n):
    for j in range(m):
        Ans[i] += Matrix[i][j] * Vector[j] 
for i in range(n):
    print Ans[i]

Solution (Python):

m = map(int, raw_input().split())
a = [map(int, raw_input().split()) for i in xrange(m[0])]
b = [int(raw_input()) for i in xrange(m[1])]
for i in xrange(m[0]):
    print sum(a[i][j] * b[j] for j in xrange(m[1]))

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

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

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


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

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

a = []
b = [0]*m
for i in xrange(n):
    x = map(int,raw_input().split(" "))
    a.append(x)

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

result = [0]*n

for i in xrange(n):
    for j in xrange(m):
        result[i] += a[i][j]*b[j]

    print result[i]

Solution (Python):


mat = {}
vec = {}

n, m = map(int, raw_input().split())
for i in range(1, n+1):
    list = map(int, raw_input().split())
    for j in range(1, m+1):
        mat[(i, j)] = list[j-1]

for i in range(1, m+1):
    vec[i] = input()

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

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


ret = []
for i in range(n):
    ret.append(sum(A[i][j] * B[j] for j in range(m)))
print('\n'.join(map(str, ret)))

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

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

Solution (Python):
n,m = map(int,raw_input().split())
a = [map(int,raw_input().split()) for _ in range(n)]
b = [input() for _ in range(m)]
for vec in a:
    sum=0
    for i in range(len(vec)):
        sum = sum + (vec[i] * b[i])
    print sum

Solution (Python):
a,b = map(int, raw_input().split())
num1, num2, ans = [], [], 0

for i in xrange(a):
    num1.append(map(int,raw_input().split()))
for i in xrange(b):
    num2.append(input())
for i in xrange(a):
    for j in xrange(b):
        ans += num1[i][j]*num2[j]
    print ans
    ans = 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)]
for ni in range(n):
    ans = 0
    for mi in range(m):
        ans += A[ni][mi] * b[mi]
    print(ans)

Solution (Python):
matrix = []
vector = []

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

for i in xrange(n):
	matrix.append(map(int, raw_input().split()))

for i in xrange(m):
	vector.append(input())

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

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=map(int,raw_input().split())
a=[]
b=[]
c=0

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

Solution (Python):
n, m = list(map(int, input().split()))
A = [[0 for w in range(m)] for h in range(n)]
B = [0 for h 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):
    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):
import sys
import math

n, m = map(int, raw_input().split())
A = []
b = []

for i in xrange(n) :
    A.append(map(int, raw_input().split()))

for i in xrange(m) :
    b.append(input())

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

Solution (Python):
A=map(int,raw_input().split(" "))
vec=A[0]
col=A[1]

def zero(n):
	zerolist=list()
	for i in range(n):
		zerolist+=[0]
	return(zerolist)
A=list()
for i in range(vec):
	A+=[zero(col)]



for i in range(vec):
	k=map(int,raw_input().split(" "))
	for j in range(col):
		A[i][j]=k[j]



v=zero(col)

for i in range(col):
	v[i]=int(raw_input())

k=0
for i in range(vec):
	for j in range(col):
		k+=A[i][j]*v[j]
	print k
	k=0

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

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 j in range(m):
    B.append(int(input()))


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

Solution (Python):
col,row = map(int,input().split())
matrix = []
vector = []
for _ in range(col):
	matrix.append([int(j) for j in input().split()])

for _ in range(row):
	vector.append(int(input()))

for i in range(col):
	ans = 0
	for x,y in zip(matrix[i],vector):
		ans += x * y
	print(ans)

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 = []

for x in range(n):
    ci = 0
    for y in range(m):
        ci += A[x][y] * b[y]
    c.append(ci)

print(*[ci for ci in c], sep = "\n")

Solution (Python):
nm=list(map(int,input().split()))
a=[[0 for x in range(nm[1])]for x in range(nm[0])]
b=[0 for x in range(nm[1])]
for x in range(nm[0]):
    code=list(map(int,input().split()))
    for y in range(nm[1]):
        a[x][y]=code[y]
for x in range(nm[1]):
    b[x] = int(input())

for x in range(nm[0]):
    result=0
    for y in range(nm[1]):
        result+=a[x][y]*b[y]
    print(result)

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 j in range(m)]
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]
    print(c[i])

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