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 x in range(n):
    A.append(list(map(int, input().split())))

B =[]

for x in range(m):
    B.append(int(input()))




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

Solution (Python):
N,M = map(int,input().split())
A = []
B = []
c = 0
for i in range(N):
  A.append([int(x) for x in input().split()])
  
for j in range(M):
  b = int(input())
  B.append(b)
  
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 = []

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

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

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

Solution (Python):
def main():
    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):
        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]
        C[i] = sum
    for i in C:
        print(f"{i}")
    return 0


if __name__ == "__main__":
    main()

Solution (Python):
n, m = map(int, input().split())
n_m_matrix = [list(map(int, input().split())) for _ in range(n)]
m_1_matrix = [int(input()) for _ in range(m)]
answer = []
for row in n_m_matrix:
    tmp = 0
    for i in range(m):
        tmp += row[i] * m_1_matrix[i]
    answer.append(tmp)

[print(n) for n in answer]

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

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

b = [0]*m

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

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

NMmatrix = []

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

Bmatrix = []

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

ans = []
    
for k in range(n):
    SUM = 0
    for l in range(m):
        SUM += NMmatrix[k][l]*Bmatrix[l]
    ans.append(SUM)

for disp in range(len(ans)):
    print(ans[disp], end='\n')

Solution (Python):
N, M = list(map(int, input().split()))
tableA= [[] for j in range(N)]
tableB = []

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

for i in range(M):
    tableB.append(int(input()))
    
for i in range(N):
    answer = 0
    for j in range(M):
        answer += tableA[i][j] * tableB[j] 
    print(f"{answer}")

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):
    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 = [map(int,input().split()) for _ in range(N)]
B = [int(input()) for _ 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())

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

vector = list()
for i in range(m):
  vector.append(int(input()))

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

[print(result[i]) for i in range(n)]

Solution (Python):
n, m = map(int, input().split())
a = [0for 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())

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[0]*n]
b=[int(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 = list()

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

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

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

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

y = []
ans = 0
for i in range(k):
    b = int(input())
    y.append(b)

for i in range(n):
    ans = 0
    for v in range(k):
        ans = ans + x[i][v] * y[v]
    print(ans, end='\n')

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 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 _ 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):
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):
    answer = 0
    for col in range(M):
        answer += A[row][col]*B[col]
    print("{}".format(answer))

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

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

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


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


for i in matrics:
	sum = 0
	for j in range(0, m):
		sum = sum + i[j] * vectors[j]
	print(sum)

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

A = []
B = []

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

C = []

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

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

count = 0
while count < i:
    x = input()
    x = [s for s in map(int, x.split())]
    a.append(x)    
    count += 1

count = 0
while count < j:
    x = input()
    x = [s for s in map(int, x.split())]
    b.append(x)
    count += 1


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

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

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

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

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

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

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

vec_A = [[] for i in range(n)]
for i in range(n):
    vec_A[i] = list(map(int, input().split()))
    
vec_b = [[0]*1 for i in range(m)]
for i in range(m):
    vec_b[i] = int(input())
    
for row in range(n):
    tmp = 0
    for col in range(m):
        tmp += vec_A[row][col] * vec_b[col]
    print('{}'.format(tmp))

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] = [int(x) for x in 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):

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

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

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 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):
def Calc(a,b,m):
    prod=0
    for i in range(m):
        prod=prod+a[i]*b[i]
    return prod


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

A=[[] 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):
    print(Calc(A[i],b,m))

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 k in range(N):
    p=0
    for z in range(M):
        p+=A[k][z]*B[z]
    print(p)

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

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

for num_a in a:
    cnt = 0
    result = 0
    for i in num_a:
        result+=i*b[cnt]
        cnt+=1
        
    print(result)

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

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

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

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

for _ in range(m):
    e = int(input())
    b.append(e)
    
for row in a:
    sum = 0
    for i in range(m):
        sum += row[i] * b[i]
    print(sum)

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

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

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

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

A_list = []
B_list = []

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

for j in range(m):
    B = int(input())
    B_list.append(B)

for l in range(n):
    answer = 0
    for k in range(m):
        answer += (A_list[l][k] * B_list[k])
    print(answer)

Solution (Python):
row , column = map(int,input().split())
b = [[0]*column for i in range(row)]

for i in range(row):
    k = list(map(int,input().split()))
    b[i] = k

for i in range(column):
    a= int(input())
    for j in range(row):
        b[j][i] *= a
    
for i in range(row):
    print(sum(b[i]))

Solution (Python):
base_num = input()
unit = base_num.split(' ')
vec_a_max = int(unit[0])
vec_b_max = int(unit[1])
end_num = 0

input_list = []
while True:
    base_suit = input()
    input_list.append(base_suit)

    end_num += 1
    if (vec_a_max + vec_b_max) == end_num:
        break

matrix_a = []
matrix_b = []
for i, r in enumerate(input_list):
    if i < vec_a_max: 
        row = r.split(' ')
        matrix_a.append([int(x) for x in row])
    else:
        matrix_b.append(int(r))

for row_a in matrix_a:
    c = 0
    for a,b in zip(row_a,matrix_b):
        c += a * b
    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)]

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

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

b_list = list()
for i in range(m):
    b_list.append(int(input()))

import operator
for a_row in a_list:
    print(sum(list(map(operator.mul, a_row, b_list))))

Solution (Python):
n, m = map(int, input().split())
mat = []
i = 0
while True:
    tmp = list(map(int, input().split()))
    mat.append(tmp)
    i += 1
    if i == n:
        break

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

for i in range(n):
    tmp = 0
    for j in range(m):
        tmp += mat[i][j] * b[j]
    
    ans.append(tmp)

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

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

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

Solution (Python):


data = list(map(int,input().split())) 
matlix = [list(map(int,input().split()))for i in range(data[0])]

vector =[]
for j in range(data[1]):
    vector.append(int(input()))


for k in range(0,data[0]):
    num=0
    
    for l in range(0,data[1]):
        num += matlix[k][l]*vector[l]
    print(num)

Solution (Python):
n,m=map(int,input().split())
A=[0 for s in range(n)]
B=[]
sum=0
for l in range(n):
    A[l]=list(map(int,input().split()))
for k in range(m):
    B.append(int(input()))
for w in range(n):
    for t in range(m):
        sum+=A[w][t]*B[t]
    print(sum)
    sum=0

Solution (Python):
n, m = list(map(int, input().split()))
A = [[0] for _ in range(n)]
for i in range(n):
    A[i] = list(map(int, input().split()))
B = [0]*m
for k in range(m):
    B[k] = int(input())
C = [0]*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):
def main():
    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] 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))

if __name__ == '__main__':
  main()

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

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

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

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

table = [0] * m
column = []

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

for j in range(n):
	column.append(int(input()))

for k in range(m):
	result = 0
	for l in range(n):
		result += table[k][l] * column[l]
	print(result)

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

c_m = 0
c_v = 0

matrix =[]
vector = []

ans = []

while c_m < n:
    matrix.append([int(n) for n in input().split()])
    c_m += 1

while c_v < m:
    vector.append(int(input()))
    c_v += 1

for N in range(n):
    a = 0
    for M in range(m):
        a += matrix[N][M]*vector[M]

    ans.append(a)

for a in ans:
    print(a)

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

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

for v in B:
    print(v)

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):
from functools import reduce

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

matrix_strings = []

for _ in range(n):
    matrix_strings.append(input())

vector_strings = []

for _ in range(m):
    vector_strings.append(input())

matrix = list(map(
    lambda matrix_string: list(map(
        lambda num_str: int(num_str),
        matrix_string.split())),
    matrix_strings))

vector = list(map(lambda num_str: int(num_str), vector_strings))

dot_product = []

for matrix_row in matrix:
    dot_product.append(
        reduce(
            lambda acc, m_ij_and_v_i: acc + (m_ij_and_v_i[0] * m_ij_and_v_i[1]),
            zip(matrix_row, vector),
            0)
    )

for dot_product_i in dot_product:
    print(dot_product_i)

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

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

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



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

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

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


for i in range(n):
    y = int(input())
    b.append(y)

    
for i in range(m):
    ans = 0
    for j in range(n):
        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 = 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):
    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()))

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

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

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

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

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

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

print(*[sum([i * j for i, j in zip(A[i], b)]) for i in range(m)], sep="\n")

Solution (Python):
N,M = map(int, input().split())
A = []

for i in range(N):
    a_num = list(map(int,input().split()))
    A.append(a_num)

b = [int(input()) for _ in range(M)]

for i in range(N):
    answer = 0
    for j in range(M):
        answer += A[i][j] * b[j]
    print(answer)

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

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

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

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

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

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

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

M = []
for i in range(1, n+1):
    row = list(map(int, input().split()))
    M.append(row)

v = []
for i in range(1, m+1):
    v.append(int(input()))


def dot_vec(vec1, vec2):
    
    return sum(
        e1 * e2 for e1, e2 in zip(vec1, vec2)
    )

ans = [
    dot_vec(row, v) for row in M
]

print(*ans, sep='\n')

Solution (Python):
n, m = map(int, input().split())
a_list = []
for i in range(n):
	a_list.append(list(map(int, input().split())))
b_list = []
for i in range(m):
	b_list.append(int(input()))
for a_rows in a_list:
	x_list = []
	index = 0
	for a in a_rows:
		x_list.append(a*b_list[index])
		index += 1
	print(sum(x_list))

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

for i in range(N):
    mult = 0
    for j in range(M):
        mult += a[i][j]*b[j]
    print(mult)

Solution (Python):
n, m = tuple(map(int, input().split(" ")))
matrixA = [list(map(int, input().split(" "))) for i in range(n)]
col_vecB = [int(input()) for i in range(m)]

for a in matrixA:
    c = 0
    for ai, b in zip(a, col_vecB):
        c += ai * b
    print(c)

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

matrixA = []
vectorB = []
c = [[0 for r in range(1)]for s in range(n)]
sums = 0


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

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


for index_row in range(len(matrixA)):
    for index_column in range(len(matrixA[index_row])):

        col_m1 = matrixA[index_row][index_column]
        col_m2 = vectorB[index_column]
        sums = sums + (col_m1*col_m2)
  
    c[index_row] = sums
    sums = 0

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

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 x in a:
        ans = 0
        for i in range(m):
            ans += x[i] * b[i]
        print(ans)
    
if __name__ == '__main__':
    main()

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

A = []
b = []
num = []
x = 0

for i in range(n):
    a = list(map(int, input().split()))    
    A.append(a)
    
for i in range(m):
    b.append(int(input()))
    
while x < n:
    for i in range(m):
        num.append(A[x][i] * b[i])
        
    x += 1
    
    print(sum(num))
    
    num = []

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

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 i in range(m):
    b.append([int(input())])

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

    print(sum_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 x in a:
    print(sum([v * w for v, w in zip(x, b)]))

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]

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

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

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

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

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

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

for l in range(n):
	t=0
	for o in range(m):
		t += x[l][o]*y[o]
	print(t)

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

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

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

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

b =[]

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




for n_s in n_m:
    out_put_plus =0
    for m_s, b_s in zip(n_s,range(m)):
        
        
        out_put_plus+= m_s * b[b_s]
    out_put.append(out_put_plus)
    
for out_put_no in out_put:
    print(out_put_no)

Solution (Python):
import math
import copy
from copy import deepcopy
import sys
import fractions

from functools import reduce

import decimal
import heapq
import collections
import itertools
sys.setrecursionlimit(100001)






def getInputInt():
    inputNum = int(input())
    return inputNum


def getInputListInt():
    outputData = []
    inputData = input().split()
    outputData = [int(n) for n in inputData]

    return outputData


def getSomeInputInt(n):
    outputDataList = []
    for i in range(n):
        inputData = int(input())
        outputDataList.append(inputData)

    return outputDataList


def getSomeInputListInt(n):
    inputDataList = []
    outputDataList = []
    for i in range(n):
        inputData = input().split()
        inputDataList = [int(n) for n in inputData]
        outputDataList.append(inputDataList)

    return outputDataList



n, m = map(int, input().split())
a = getSomeInputListInt(n)
b = getSomeInputInt(m)

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