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):
s = input().rstrip().split(' ')
H = int(s[0])
W = int(s[1])
a = [[0] * W for i in range(H)]
for i in range(H):
  t = input().rstrip().split(' ')
  for j in range(W):
    a[i][j] = int(t[j])
b = []
for k in range(W):
  c = int(input())
  b.append(c)
for l in range(H):
  sum = 0
  for m in range(W):
    x = int(a[l][m])
    y = int(b[m])
    sum += x * y
  print(sum)

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

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

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

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

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

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

Solution (Python):
import bisect,collections,copy,itertools,math,string
def I(): return int(input())
def S(): return input()
def LI(): return list(map(int,input().split()))
def LS(): return list(input().split())

n,m = LI()
A = [LI() for _ in range(n)]
B = [I() for _ in range(m)]
for i in range(n):
    temp = 0
    for j in range(m):
        temp += A[i][j]*B[j]
    print(temp)

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

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

A = [[] for i in range(N)]

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

B = [[0]*1 for i in range(M)]

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


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

Solution (Python):

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

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

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

mg = [int(input()) for i in range(m)]
for x in range(n):
    for y in range(m):
        sum[x] += nm[x][y] * mg[y]
for x in range(n):
    print(sum[x])

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

A = []
B = []

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

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

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

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

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

for row in range(N):
    tmp = 0
    for col in range(M):
        tmp += A[row][col]* b[col]
    print(tmp)

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

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

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

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

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

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

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

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

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

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

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

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] = input().split()

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

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

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

Solution (Python):
aj = []
bj = []
c = []

n, m = list(map(int, input().split()))
for i in range(n):
    ai = list(map(int, input().split()))
    aj.append(ai)
for j in range(m):
    bj.append(input())
for k in range(n):
    ctmp = 0
    for l in range(m):
        ctmp = ctmp + int(aj[k][l])*int(bj[l])
    c.append(ctmp)
for o in range(n):
    print(c[o])

Solution (Python):
n,m = map(int,input().split())
a = list()
b = list()
for i in range(n):
    a_i = list(map(int,input().split()))
    a.append(a_i)
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()
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(map(int, input().split())) for _ in range(n)]
b = [int(input()) for _ in range(m)]
for l in A:
  print(sum([val * b[num] for num, val in enumerate(l)]))

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

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

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

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

Solution (Python):
i,j = map(int,input().split())
a = list()
b = list()
c = list()
c_e = 0

for r in range(i):
    e = list(map(int,input().split()))
    a.append(e)
    
for r in range(j):
    n = int(input())
    b.append(n)
    
for r in range(i):
    for t in range(j):
        c_e += a[r][t]*b[t]
    else:
        c.append(c_e)
        c_e = 0
        
for s in range(len(c)):
    print(c[s])

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

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

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

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

for k in range(n):
    r=0
    for l in range(m):
        r+=a[k][l]*b[l]
    print(r)

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



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 = [[] 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):
    c = 0
    for col in range(m):
        c += A[row][col] * B[col]
    print("%d" %(c))

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

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

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

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


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

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

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())
l = [0]*n
for i in range(0,n):
    l[i] = list(map(int, input().split()))
c = [int(input()) for i in range(m)]

sum = [0]*n

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



for i in range(0,n):
    print(sum[i])

Solution (Python):
import sys


read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

tower = [[[0] * 10 for i in range(3)] for j in range(4)]

N, M = map(int, readline().split())
A = [[int(i) for i in readline().split()] for _ in range(N)]
B = [int(readline()) for _ in range(M)]
li = [0] * N
for n,i in enumerate(A):
    for num, j in enumerate(B):
        li[n] += i[num] * j

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

Solution (Python):
def main(a, b):
    outputs = ''
    m = len(b)
    for row in a:
        result = 0
        for j in range(m):
            result += row[j]*b[j]
        outputs += '{}\n'.format(result)
    return outputs


if __name__ == "__main__":
    n, m = map(int, input().split())
    a = [list(map(int, input().split())) for i in range(n)]
    b = [int(input()) for m in range(m)]
    print(main(a, b), end='')

Solution (Python):


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

A = [[0 for _ in range(m)] for _ in range(n)]
b = [0 for _ in range(m)]
c = [0 for _ in range(n)]

for row in range(n):
    arow = list(map(int, input().split()))
    for j in range(m):
        A[row][j] = arow[j]

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

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

for j in c:
    print(j)

Solution (Python):
n, m = map(lambda x: int(x), input().split(" "))
v = []
for i in range(n):
    v.append(list(map(lambda x: int(x), input().split(" "))))
q = []
for i in range(m):
    q.append(int(input()))
result = []
for i in range(n):
    x = 0
    for j, val in enumerate(v[i]):
        x += val * q[j]
    result.append(x)
for x in result:
    print(x)

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

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

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

Solution (Python):

import sys



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

out=[]
for i in range(n):
    out.append(0)

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







for i in range(m):
    b= int(input())
    for j in range(n):
        out[j]+=a[j][i]*b


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

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

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

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

for ans_row in ans :
    print(ans_row)

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

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

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

mat = []
vec = []
ans = []

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

for j in range(b):
    vec.append(int(input()))
        
for i in range(a):
    tmp = 0
    for j in range(b):
        tmp += mat[i][j] * vec[j]
    ans.append(tmp)

for i in ans:
    print(i)

Solution (Python):
mn = input()
mn = mn.split()
m, n = int(mn[0]), int(mn[1])
A_array = list()
for i in range(m):
    A = input()
    A = A.split()
    A_array.append(A)
B_array = list()
for j in range(n):
    b = input()
    B_array.append(int(b))
for i in A_array:
    result = 0
    for A,B in zip(i,B_array):
        result += int(A)*int(B)
    else:
        print(result)

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

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

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

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

a = list()
b = list()

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

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

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

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

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

Solution (Python):
x,y = map(int, input().split())

mat = [list(map(int, input().split())) for i in range(x)]
vct = [int(input()) for i in range(y)]

for m in mat:
    ddd = 0
    for a in range(y):
        ddd += m[a] * vct[a]
    print(ddd)

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

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

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

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

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

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

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

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

a = {}

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

b = {}

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

for i in range(n):
    res = 0
    for j in range(m):
        res += dat[i][j] * datc[j]
    print(res)

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

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

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

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

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

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






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

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

    print(answer)

Solution (Python):
matrixlst = []
vectorlst = []
vector2lst = []
tempresult = 0
count = 0
count2 = 0
i = 0
j = 0
finalA = 0
finalB = 0
testnumber = 0
n, m = input().split()
for b in range(int(n)):
    testinput = [int(x) for x in input().split()]
    for c in range(int(m)):
        matrixlst.append(testinput[count])
        count += 1
    count = 0
    testinput.clear()
for d in range(int(m)):
    testinput = int(input())
    vectorlst.append(testinput)
for e in range(int(n)):
    for f in range(int(m)):
        finalA = int(matrixlst[testnumber])
        finalB = int(vectorlst[j])
        tempresult += int(finalA * finalB)
        j += 1
        testnumber += 1
    vector2lst.append(tempresult)
    j = 0
    tempresult = 0
for g in range(int(n)):
    print(vector2lst[count2])
    count2 += 1

Solution (Python):
R,C = map(int,input().split(' '))
row_column = list()
for r in range(R):
    row_column.append(list(map(int,input().split(' '))))
for c in range(C):
    vector = int(input())
    for item in row_column:
        item[c] *= vector
for item in row_column:
    print(sum(item))

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

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

for i in range(n):
	num = 0
	for j in range(m):
		num += bec1_list[i][j] * bec2_list[j][0]
	print(str(num))

Solution (Python):
n, m = map(int, input().split())
matrix_a = [[0 for i in range(m)]for j in range(n)]
matrix_b = [0]*m
matrix_c = [0]*n

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

for i in range(m):
    matrix_b[i] = int(input())
        
for i in range(n):
    for j in range(m):
        matrix_c[i] += matrix_a[i][j] * matrix_b[j] 
    print(matrix_c[i])

Solution (Python):

list_xy = list(map(int, input().split()))


list_A = [[0 for i in range(list_xy[1])] for j in range(list_xy[0])]
list_b = list()
result = list()




for i in range(list_xy[0]):
    input_temp = list(map(int, input().split()))
    for j in range(list_xy[1]):
        list_A[i][j] = input_temp[j]


for i in range(list_xy[1]):
    list_b.append(int(input()))



for i in range(list_xy[0]):
    result_temp = 0
    for j in range(list_xy[1]):
        result_temp += list_A[i][j] * list_b[j]
    result.append(result_temp)



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

Solution (Python):
n, m = map(int, input().split(' '))
a = []
for i in range(n):
    a.append([item for item in 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):
import sys
input = sys.stdin.readline

def main():
    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)]

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


if __name__ == "__main__":
    main()

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

for i in range(n):
 ai = 0;
 for mi in range(m):
  ai = ai + A[i][mi]*b[mi];
 print(ai)

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

list_s=[int(i) for i in input().split()]

for w in range(list_s[0]):
    list_1=[int(i) for i in input().split()]
    queue.append(list_1)

for i in range(list_s[1]):
    b.append(int(input()))

for n in range(list_s[0]):
    ans=0
    for q in range(list_s[1]):
        ans=ans+(queue[n][q]*b[q])
        
    print(ans)

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


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

ans = [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):
        ans[i] += A[i][j] * b[j]

for val in ans:
    print(val)

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


ff=[]
for i in range(a):
    f=0
    for j in range(b):
       f += (int(c[i][j])*int(d[j][0]))
    ff.append(f)
    
for i in range(len(ff)):
    print(ff[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 = []
for a in A:
    vec = 0
    for i in range(m):
        vec += a[i] * B[i]
    ans.append(vec)
print("\n".join(map(str, ans)))

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

arrs = []

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

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

for arr in arrs:
    c = 0
    for i in range(len(arr)):
        c += arr[i] * vector[i]
    print(c)

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

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

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

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

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

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

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

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

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

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

Solution (Python):

row, collumn = list(map(int, input().split()))
A = []
for _ in range(row):
    line = list(map(int, input().split()))
    A.append(line)

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


for r in range(row):
    sum = 0
    for c in range(collumn):
        sum += A[r][c] * b[c]
    print(sum)

Solution (Python):

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


a = [input().split() for i in range(n)]


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


for k in range(n):
    
    output = 0
    for l in range(m):
        output = output + int(a[k][l]) * int(b[l])
    print(output)

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

ans = [0] * n

for i in range(n):
    res = 0
    for a, b in zip(matrix[i], vector):
        res += a * b
    ans[i] = res

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

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

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):
r, c = map(int, input().split())

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

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

for i in range(r):
    inner = 0
    for j in range(c):
        inner += A[i][j] * b[j]
    print(inner)

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


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


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

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

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

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

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