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=list(map(int,input().split()))
A=[[] for i in range(n)]
A1=[[0 for x in range(m)] for y in range(n)]
B=0
C=0
D=0
c=[[0] for i in range(m)]
b=[[0] for i 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 k in range(n):
    B=0
    for l in range(m):
        B+=A[k][l]*b[l]
    print(B)

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

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

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

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

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

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

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

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

a = []
b = []

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

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

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

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

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

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

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

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

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

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

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

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

b=[]

for i in range(m):
    x=int(input())
    b.append(x)
c=[0]*n


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



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

Solution (Python):
num1,num2=input().split(" ")
vec=[]
a=[]
for i in range(int(num1)):
    c=[]
    b=input().split(" ")
    for j in range(int(num2)):
        c.append(int(b[j]))
    a.append(c)
for k in range(int(num2)):
    num4=int(input())
    vec.append(num4)
for l in range(int(num1)):
    sum=0
    for m in range(0,len(vec),1):
        sum=sum+(a[l][m]*vec[m])
    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 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 = (int(x) for x in input().split())
A = [input().split() for i in range(n)]
b = [int(input()) for i in range(m)]

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

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

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

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

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

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

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

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

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

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

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

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

for i in range(0, m):
  b.append(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):
n, m = map(int, input().split())

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

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

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

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

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

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

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

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

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

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

for _ in range(n):
    matrix1.append(list(map(int, input().split())))
    
for _ in range(m):
    matrix2.append([int(input())])

for i in range(n):
    elem = 0
    for j in range(m):
        elem += matrix1[i][j] * matrix2[j][0]
    ans.append([elem])

for row in ans:
    for column in row:
        print(column)

Solution (Python):
def mapt(fn, *args):
    return tuple(map(fn, *args))
    
n, m = mapt(int, input().split(" "))
nums = [mapt(int, input().split(" ")) for i in range(n)]
b = [int(input()) for i in range(m)]

for row in nums:
    print(sum(i*j for i, j in zip(b,row)))

Solution (Python):





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


if __name__ == '__main__':
    main()

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

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

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

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

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

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

Solution (Python):
n,m=map(int,input().split())
a=[]
while True:
    try:
        for i in range(n):
            a.append(list(map(int,input().split())))
        b=[int(input()) for j in range(m)]
        for k in range(n):
            q=a[k]
            w=0
            for l in range(m):
                w+=b[l]*q[l]
            print(w)
        
    except:
        break;

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

Solution (Python):
n, m = map(int, input().split())
mat = [list(map(int, input().split())) for _ in range(n)]
vec = [int(input()) for _ in range(m)]
ans = [0]*n
for i, row in enumerate(mat):
    for j in range(m):
        ans[i] += row[j] * vec[j]
[print(ans[i]) for i in range(n)]

Solution (Python):
n, m = map(int, input().split())
matrix1 = [[0]*m]*n
matrix2 = [0]*m
answer = [0]*n
for i in range(n):
  matrix1[i] = list(map(int, input().split()))
for i in range(m):
  matrix2[i] = int(input())

for i in range(n):
  for j in range(m):
    answer[i] += matrix1[i][j] * matrix2[j]
  print(answer[i])

Solution (Python):
N,M=map(int,input().split())
K=[0]*N
T=[]
for k in range(N):
  C=list(map(int,input().split()))
  T.append(C)
D=[int(input()) for i in range(M)]
for i in range(N):
  for j in range(M):
    K[(i*M+j)//M]+=T[i][j]*D[j]
for o in range(N):
  print(K[o])

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

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

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


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

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

for k in c:
    print(k)

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

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

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

C = []
for i in range(n):
    for j in range(m):
        c = A[i][j]*B[j]
        C.append(c)
        
d = math.ceil(len(C)/n)
r = [C[x: x+d] for x in range(0,len(C),d)]

for i in range(len(r)):
    s = sum(r[i])
    print(s)

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

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

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

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


    print(c[i])

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

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

Solution (Python):



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

Solution (Python):
n, m = map(int, input().split())
A = [[0 for col in range(m)] for row in range(n)]
b = [0 for element in range(m)]


for row in range(n):
    temp = input().split()
    temp = [int(a) for a in temp]
    for col in range(m):
        A[row][col] = temp[col]

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

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

Solution (Python):
var=input()
var=var.split()
n=int(var[0])
m=int(var[1])
A=[[0 for i in range(m)]for j in range(n)]
b=[0 for i in range(m)]
c=[0 for i in range(n)]
for i in range(n):
    var=input()
    var=var.split()
    for j in range(m):
        A[i][j]=int(var[j])
for i in range(m):
    var=input()
    var=var.split()
    b[i]=int(var[0])
line=0

for line_A in A:
    line_b=0
    for row in line_A:
        c[line]+=row*b[line_b]
        line_b+=1
    print(c[line])
    line+=1

Solution (Python):
N,M = list(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):
    num = 0
    for j in range(M):
        num += a[i][j]*b[j]
    print(num)

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 = [[0] * m for _ in range(n)]
B = [0] * m
for i in range(n):
    M = list(map(int, input().split()))
    for j in range(m):
        A[i][j] = M[j]
for i in range(m):
    M = int(input())
    B[i] = M
C = [0] * n
for i in range(n):
    for j in range(m):
        C[i] += A[i][j] * B[j]
for c in C:
    print(c)

Solution (Python):
num=list(map(int,input().split(" ")))
matrix=[list(map(int,input().split(" ")))for i in range(num[0])]
vector=[int(input())for i in range(num[1])]
ans=[]
for i in range(num[0]):
    ans.append(sum([(matrix[i][j]*vector[j])for j in range(num[1])]))
for i in ans:
    print(i)

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

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

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

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




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

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

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

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

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

Solution (Python):
n,m=map(int,input().split())
P=[]
Q=[]
c=0

for i in range(n):
    P.append(input().split())
    
for j in range(m):
    b=int(input())
    Q.append(b)
    
for k in range(n):
    for l in range(m):
        a=P[k]
        c+=int(a[l])*Q[l]
    print(c)
    c=0

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

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

for k in range(n):
    lstc=[]
    for l in range(m):
        c=lsta[k][l]*lstb[l]
        lstc.append(c)
    print(sum(lstc))

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

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

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

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

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

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

A = []
B = []

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

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

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




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


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

Solution (Python):
def multiply_columns(column_a, column_b):
    total = 0
    
    for a, b in zip(column_a, column_b):
        total += (a * b)
    
    return total


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

matrix = []
column_matrix = []

for _ in range(n):
    nums = [int(y) for y in input().split()]
    matrix.append(nums)

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

totals = []
total = 0

for column in matrix:
    total = multiply_columns(column, single_column_vector)
    totals.append(total)

for total in totals:
    print(total)

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

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

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

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

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





for k in range(n):
    z=0
    for l in range(m):
        z+=y[l]*x[k][l]

    print(z)

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

a=[[0 for M in range(m)]for N in range(n)]
for k in range(n):
    A=list(map(int,input().split()))
    a[k]=A

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

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

Solution (Python):
N,M,*A = map(int, open(0).read().split())
B = A[N*M:]

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

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

Solution (Python):
i, j = map(int, input().split())
list_a = []
list_b = []

for n in range(i):
    list_a.append(list(map(int, input().split())))
for n in range(j):
    list_b.append(int(input()))
for n in range(i):
    result = 0
    for m in range(j):
        result += list_a[n][m] * list_b[m]
    print(result)

Solution (Python):
nrow, col = [], []

n, m = map(int, input().split())
count = 0
while count < n:
    nrow.append(list(map(int, input().split())))
    count += 1
count = 0
while count < m:
    col.append(int(input()))
    count += 1

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

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

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

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

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

for i in range(n):
    res = 0
    for bb, aa in zip(b, A[i]):
        res += bb * aa
    print(res)

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

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

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

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

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

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

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

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

for val in c:
    print(val)

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

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

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




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

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

    for _ in range(n):
        a.append([int(s) for s in input().split()])

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

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


resolve()

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

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

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

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

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



answer = []

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

    answer.append(row_sum)

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

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


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

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

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

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

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

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

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

    for a in A:
        ans=0
        for a_value,b_value in zip(a,B):
            ans+=a_value*b_value
        print(ans)

if __name__=="__main__":
    main()

Solution (Python):
def mul(m, v):
    ans = []
    for row in m:
        a = 0
        for i in range(len(row)):
            a += row[i] * v[i]
        ans.append(a)
    return ans


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

matrix = []
vector = []

for _ in range(n):
    matrix.append([int(i) for i in input().strip().split()])

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

ans = mul(matrix, vector)

for e in ans:
    print(e)

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

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

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

d=[]
for i in range(b):
    d.append(int(input()))
for i in range(a):
    sum=0
    for j in range(b):
        sum+=c[i][j]*d[j]
    print(sum)

Solution (Python):
import sys
n,m = map(int,input().split())
line = []
for _ in range(n):
    data = [int(i) for i in sys.stdin.readline().strip().split(" ")]
    line.append(data)
b = []
for _ in range(m):
    data = int(sys.stdin.readline().strip())
    b.append(data)

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