qyliang/CodeNanoFix huggingface dataset:
Buggy code:
def solve():
    n, m, c = map(int, input().split())
    b = list(map(int, input().split()))
    a = [list(map(int, input().split())) for _ in range(n)]
    s = 0
    ans = 0
    for i in range(n):
        for j in range(m):
            s += a[i][j] * b[j]
        s += c
        print(s)
        if s > 0:
            ans += 1
    print(ans)


if __name__ == '__main__':
    solve()


Fixed code:
def solve():
    n, m, c = map(int, input().split())
    b = list(map(int, input().split()))
    a = [list(map(int, input().split())) for _ in range(n)]
    s = 0
    ans = 0
    for i in range(n):
        s = 0
        for j in range(m):
            s += a[i][j] * b[j]
        if s + c > 0:
            ans += 1
    print(ans)


if __name__ == '__main__':
    solve()
Buggy code:
import numpy as np
n,m,c=map(int,input().split())
b=np.array(list(map(int,input().split())))
ac=0
for _ in range(n):
    a=np.array(list(map(int,input().split())))
    print(a*b)
    if sum(a*b)+c >0:
        ac+=1
print(ac)


Fixed code:
import numpy as np
n,m,c=map(int,input().split())
b=np.array(list(map(int,input().split())))
ac=0
for _ in range(n):
    a=np.array(list(map(int,input().split())))
    if sum(a*b)+c >0:
        ac+=1
print(ac)
Buggy code:
n, m, c = map(int, input().split())
b = input().split()
a = [input().split() for input() in range(n)]

cnt = 0
for an in a:
    dot = 0
    for i, j in zip(an, b):
        dot += i*j
    dot += c
    cnt += (dot>0).astype(int)
    
print(cnt)

Fixed code:
n, m, c = map(int, input().split())
b = [int(x) for x in input().split()]
a = []
for i in range(n):
    a.append([int(x) for x in input().split()])
cnt = 0
for an in a:
    dot = 0
    for i, j in zip(an, b):
        dot += i*j
    dot += c
    cnt += int(dot>0)
    
print(cnt)
Buggy code:
# S = input()
# print('Heisei' if S <= '2019/04/30' else 'TBD')

n,m,c=map(int,input().split())
b=list(map(int,input().split()))
e = [[int(i) for i in input().split()] for i in range(n)]

total=0
count=0


for j in range(0,n):
	total=0
	for k in range(0,m):
		total+=e[j][k]*b[k]
		print("total is ",total)
	if total+c>0:
		count+=1

print(count)


Fixed code:
# S = input()
# print('Heisei' if S <= '2019/04/30' else 'TBD')

n,m,c=map(int,input().split())
b=list(map(int,input().split()))
e = [[int(i) for i in input().split()] for i in range(n)]

total=0
count=0


for j in range(0,n):
	total=0
	for k in range(0,m):
		total+=e[j][k]*b[k]
	if total+c>0:
		count+=1

print(count)
Buggy code:
N, M, C = map(int, input().split())
cnt = 0
for i in range(N):
  if i == 0:
      B = list(map(int, input().split()))
  else:
      A = list(map(int, input().split()))
      ans = 0
      for i in range(M):
          ans += B[i] * A[i]
      if ans + C > 0:
          cnt += 1
print(cnt)

Fixed code:
N, M, C = map(int, input().split())
cnt = 0
B = list(map(int, input().split()))
for i in range(N):
    A = list(map(int, input().split()))
    ans = 0
    for j in range(M):
        ans += B[j] * A[j]
    if ans + C > 0:
        cnt += 1
print(cnt)
Buggy code:
from operator import mul

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

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

ans = 0

for i in range(N):
  tmplist = list(map(int,input().split()))
  
  combined = list(map(mul,B_list,tmplist))

  if sum(combined)  + C <= 0:
    ans += 1

print(ans)
    

Fixed code:
from operator import mul

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

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

ans = 0

for i in range(N):
  tmplist = list(map(int,input().split()))
  
  combined = list(map(mul,B_list,tmplist))

  if sum(combined)  + C > 0:
    ans += 1

print(ans)
Buggy code:
N,M,C=map(int,input().split())
B=list(map(int,input().split()))
k=0
for i in range(N-1):
    s=0
    A=list(map(int,input().split()))
    for j in range(M-1):
        s+=A[j]*B[j]
    s+=C
    if s>0:
        k+=1
print(k)


Fixed code:
N,M,C=map(int,input().split())
B=list(map(int,input().split()))
k=0
for i in range(N):
    s=0
    A=list(map(int,input().split()))
    for j in range(M):
        s+=A[j]*B[j]
    s+=C
    if s>0:
        k+=1
print(k)
Buggy code:
n, m, c = [int(i) for i in input().split()]
bs = [int(i) for i in input().split()]
ans = 0
for i in range(n):
    a_list = [int(i) for i in input().split()]
    cond = sum(a+b for a, b in zip(a_list, bs)) + c
    if cond > 0:
        ans += 1

Fixed code:
n, m, c = [int(i) for i in input().split()]
bs = [int(i) for i in input().split()]
ans = 0
for _ in range(n):
    a_list = [int(i) for i in input().split()]
    cond = sum(a*b for a, b in zip(a_list, bs)) + c
    if cond > 0:
        ans += 1
print(ans)
Buggy code:
x, y, z = map(int, input().split())
lst = [i for i in map(int, input().split())]
cnt = 0
for _ in range(x):
    lst_a = [i for i in map(int, input().split())]
    total = z
    for i in range(y):
        total += lst[i] * lst_a[i]
        if total > 0:
            cnt += 1
print(cnt)

Fixed code:
x, y, z = map(int, input().split())
lst = list(map(int, input().split()))
cnt = 0
for _ in range(x):
    lst_a = list(map(int, input().split()))
    total = z
    for i in range(y):
        total += lst[i] * lst_a[i]
    if total > 0:
        cnt += 1
print(cnt)
Buggy code:
n,m,c = map(int,input().split())
b = list(map(int,input().split()))
ans=0
for i in range(n):
    tmp=0
    for j in range(m):
        a = int(input())
        tmp += a * b[j]
    tmp -= c
    if(tmp>0):
        ans += 1

print(ans)

Fixed code:
n,m,c = map(int,input().split())
b = list(map(int,input().split()))
ans=0
for i in range(n):
    tmp=0
    a = list(map(int, input().split()))
    for j in range(m):
        tmp += a[j] * b[j]
    tmp += c
    if(tmp>0):
        ans += 1

print(ans)
Buggy code:
N,M,C = map(int, input().split())
B = list(map(int, input().split()))
ans = 0
for i in range(N):
  A = list(map(int, input().split()))
  condition = C
  for j in range(M-1):
    condition += A[j]*B[j]
  if condition > 0:
    ans += 1
print(ans)


Fixed code:
N,M,C=map(int,input().split())
B=list(map(int,input().split()))
ans=0
for i in range(N):
  A=list(map(int,input().split()))
  if sum([A[j]*B[j] for j in range(M)])+C > 0:
    ans+=1
print(ans)
Buggy code:
n,m,c=map(int,input().split())
b=list(map(int,input().split()))
count=0
ans=0
for i in range(n):
    a=list(map(int,input().split()))
    for j in range(m):
        ans+=a[j]*b[j]
        print(ans)
    if ans+c>0:
        count+=1
            
print(count)

Fixed code:
n,m,c=map(int,input().split())
b=list(map(int,input().split()))
count=0
for i in range(n):
    ans=0
    a=list(map(int,input().split()))
    for i in range(m):
        ans+=a[i]*b[i]
    if ans+c>0:
        count+=1
print(count)
Buggy code:
N, M, C = map(int,input().split())
B = list(map(int,input().split()))
cnt = 0
for _ in range(N):
    ans = 0
    A = list(map(int,input().split()))
    for i in range(M):
        ans += A[i] * B[i]
        if ans > C:
            cnt += 1
print(cnt)

Fixed code:
N, M, C = map(int,input().split())
B = list(map(int,input().split()))
cnt = 0
for _ in range(N):
    ans = 0
    A = list(map(int,input().split()))
    for i in range(M):
        ans += A[i] * B[i]
    ans += C
    if ans > 0:
        cnt += 1
print(cnt)
Buggy code:
NMC = list(map(int,input().split()))
N=NMC[0]
M=NMC[1]
C=NMC[2]
B=list(map(int,input().split()))
A = [list(map(int,input().split())) for l in range(N)]
cnt=0
summary=0
for i in range(N):
    for j in range(M):
        summary=A[i][j]*B[j]+summary
    summary=summary+C
    print(summary)
    if summary>0:
        cnt=cnt+1

print(cnt)


Fixed code:
NMC = list(map(int,input().split()))
N=NMC[0]
M=NMC[1]
C=NMC[2]
B=list(map(int,input().split()))
A = [list(map(int,input().split())) for l in range(N)]
cnt=0

for i in range(N):
    summary=0
    for j in range(M):
        summary=A[i][j]*B[j]+summary
    summary=summary+C
    if summary>0:
        cnt=cnt+1

print(cnt)
Buggy code:
n, m, c = map(int, input().split())
b = list(map(int, input().split()))

count = 0
for i in range(0, n - 1):
    a = list(map(int, input().split()))
    s = 0
    for j in range(0, m - 1):
        s += a[j] * b[j]
    if s + c > 0:
        count += 1
print(count)


Fixed code:
n, m, c = map(int, input().split())
b = list(map(int, input().split()))

count = 0
for i in range(0, n):
    a = list(map(int, input().split()))
    s = 0
    for j in range(0, m):
        s += a[j] * b[j]
    if s + c > 0:
        count += 1
print(count)
Buggy code:
N,M,C = map(int,input().split())
b = list(map(int, input().split()))
a = []
for _ in range(N):
    l = list(map(int, input().split()))
    a.append(l)

print(b)
print(a)

c = 0
for i in range(N):
    g = 0
    for aa,bb in zip(a[i],b):
        g += aa*bb
    g += c
    if g > 0:
        c += 1
print(c//2)

Fixed code:
N,M,C = map(int,input().split())
b = list(map(int, input().split()))
a = []
for _ in range(N):
    l = list(map(int, input().split()))
    a.append(l)

#print(b)
#print(a)

c = 0
for i in range(N):
    g = 0
    for aa,bb in zip(a[i],b):
        g += aa*bb
    g += C
    #print('g:',g)
    if g > 0:
        c += 1
print(c)
Buggy code:
# ABC121
# B Can you solve this?
N, M, C = map(int, input().split())
B = list(map(int, input().split()))
A = [list(map(int, input().split())) for _ in range(N)]
ans = 0
ANS = []
ct = 0
for i in range(N):
    for j in range(M):
        ans += A[i][j] * B[j]
        if j == M-1:
            ANS.append(ans)
            ans = 0
print(ANS)
for x in ANS:
    if x + C > 0:
        ct += 1
print(ct)


Fixed code:
# ABC121
# B Can you solve this?
N, M, C = map(int, input().split())
B = list(map(int, input().split()))
A = [list(map(int, input().split())) for _ in range(N)]
ans = 0
ANS = []
ct = 0
for i in range(N):
    for j in range(M):
        ans += A[i][j] * B[j]
        if j == M-1:
            ANS.append(ans)
            ans = 0
for x in ANS:
    if x + C > 0:
        ct += 1
print(ct)
Buggy code:
N,M,C = map(int,input().split())
Bn = map(int,input().split())
ans=0
for n in range(N):
    As = map(int,input().split())
    if sum([x*y for (x,y) in zip(As,Bn)])>C:
        ans+=1
print(ans)
        

Fixed code:
N,M,C = map(int,input().split())
Bn = list(map(int,input().split()))
ans=0
nums = []
for n in range(N):
    As = list(map(int,input().split()))
    if sum([x*y for (x,y) in zip(As,Bn)])+C>0:
        ans+=1
print(ans)
Buggy code:
n,m,c=map(int,input().split())
B = list(map(int,input().split()))
A = [list(map(int,input().split())) for i in range(n)]

ans = 0 
t = c
for row in A:
    for a,b in zip(row,B):
        t += a*b
    if t > 0 :
        ans += 1
print(ans)

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

ans = 0 
for row in A:
    t = c    
    for a,b in zip(row,B):
        t += a*b
    if t > 0 :
        ans += 1
print(ans)
Buggy code:
N,M,C = map(int,input().split())
B = list(map(int,input().split()))
ans = 0
for i in range(0,n) :
    A = list(int,input().split())
    Sum = C
    for (x,y) in zip(A,B):
        Sum += (x*y)
    if wa > 0 :
        ans += 1
print(ans)

Fixed code:
N,M,C = map(int,input().split())
B = list(map(int,input().split()))
ans = 0
for i in range(0,N) :
    A = list(map(int,input().split()))
    Sum = C
    for (x,y) in zip(A,B):
        Sum += (x*y)
    if Sum > 0 :
        ans += 1
print(ans)
Buggy code:
NMC = list(map(lambda x: int(x), input().split()))
N = NMC[0]
M = NMC[1]
C = NMC[2]

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

print("B", B)
print("A", A)
print("N", N)
print("M", M)
print("C", C)

answer = 0

for i in range(len(A)):
  judge = 0
  for m in range(len(A[i])):
    judge += A[i][m] * B[m]

  print("judge", judge)
  if (judge + C > 0):
    answer += 1

print(answer)

Fixed code:
NMC = list(map(lambda x: int(x), input().split()))
N = NMC[0]
M = NMC[1]
C = NMC[2]

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

answer = 0

for i in range(len(A)):
  judge = 0
  for m in range(len(A[i])):
    judge += A[i][m] * B[m]
  if (judge + C > 0):
    answer += 1

print(answer)
Buggy code:
N,M,C = map(int,input().split())
B = list(map(int,input().split()))
ans = 0
for i in range(N):
  A = list(map(int,input().split()))
  tmp = 0
  for j in range(M):
    tmp += A[i]*B[i]
  if tmp + C > 0:
    ans += 1
print(ans)


Fixed code:
N,M,C = map(int,input().split())
B = list(map(int,input().split()))
ans = 0
for i in range(N):
  A = list(map(int,input().split()))
  tmp = 0
  for j in range(M):
    tmp += A[j]*B[j]
  if tmp + C > 0:
    ans += 1
print(ans)
Buggy code:
N,M,C = map(int,input().split())
B = list(map(int,input().split()))
ans = 0
for i in range(N):
  A = list(map(int,input().split()))
  if sum(A*B) + C > 0:
    ans += 1
print(ans)

Fixed code:
N, M, C = map(int,input().split())
B = list(map(int,input().split()))

ans = 0
for i in range(N):
    A = list(map(int,input().split()))
    sum = C

    for j in range(M):
        sum += A[j] * B[j]

    if sum > 0:
        ans += 1

print(ans)
Buggy code:
n,m,c = map(int, input().split())
b = list(map(int, input().split()))
count = 0
for i in range(n):
  a = list(map(int, input().split()))
  for k in range(m):
    p = c
    p += a[k]*b[k]
    if p>0: count+=1
print(count)

Fixed code:
n,m,c = map(int, input().split())
b = list(map(int, input().split()))
count = 0
for i in range(n):
  a = list(map(int, input().split()))
  p = c
  for k in range(m):
    p += a[k]*b[k]
  if p>0: count+=1
print(count)
Buggy code:
n,m,c=map(int,input().split())
b=map(int,input().split())
a=0
for _ in range(n):
  a=map(int,input().split())
  s=0
  for i in range(m):
    s+=a[i]*b[i]
  if s > -c:
    a+=1
print(a)

Fixed code:
n,m,c=map(int,input().split())
b=list(map(int,input().split()))
r=0
for _ in range(n):
  a=list(map(int,input().split()))
  s=0
  for i in range(m):
    s+=a[i]*b[i]
  if s > -c:
    r+=1
print(r)
Buggy code:
N,M,C = map(int,input().split())
B = list(int,input().split())
count = 0
for i in range(N):
  a = list(int,input().split())
  for i in range(M):
    s += B[i]*a[i]
  if s+C>0:
    count+=1
print(count)

Fixed code:
N,M,C = map(int,input().split())
B = list(map(int,input().split()))
count = 0
for i in range(N):
  a = list(map(int,input().split()))
  P = C  
  for j in range(M):
    P += B[j]*a[j]
  if P>0:
    count+=1
print(count)
Buggy code:
N, M, C = map(int, input().split())
B = [int(i) for i in input().split()]
A = [[int(i) for i in input().split()] for j in range(N)]
judge = 0
count = 0

for i in range(N):
    for j in range(M):
        judge += B[j] * A[i][j]
    if judge + C > 0:
        count += 1

print(count)

Fixed code:
N, M, C = map(int, input().split())
B = [int(i) for i in input().split()]
A = [[int(i) for i in input().split()] for j in range(N)]
judge = 0
count = 0

for i in range(N):
    for j in range(M):
        judge += B[j] * A[i][j]
    if judge + C > 0:
        count += 1
    else:
        pass
    judge = 0

print(count)
Buggy code:
n, m, c = map(int, input().split())
bl = [int(i) for i in input().split()]
ans = 0
for i in range(n):
  al = [int(j) for j in input().split()]
  ans += sum([bl[j] * al[j] for j in range(m)) + c > 0
print(ans)

Fixed code:
n, m, c = map(int, input().split())
bl = [int(i) for i in input().split()]
ans = 0
for i in range(n):
  al = [int(j) for j in input().split()]
  ans += sum([bl[j] * al[j] for j in range(m)]) + c > 0
print(ans)
Buggy code:
N , M ,C  = map(int,input().split())
B = map(int, input().split())

count = 0
for i in range(N):
    A = list(map(int, input().split()))
    p = C
    for j in range(M):
        p+= A[j]*B[j]
        if p > 0:
            count+=1
print(count)



Fixed code:
N,M,C=map(int,input().split())
B=list(map(int,input().split()))
count=0
for i in range(N):
 A=list(map(int,input().split()))
 p=C
 for j in range(M):p+=A[j]*B[j]
 if p>0:count+=1
print(count)
Buggy code:
N, M, C = map(int, input().split())
B = list(map(int, input().split()))

count = 0
for i in range(N):
    lst = list(map(int, input().split()))
    lb = 0
    for l,b in zip(lst,B):
        lb + l * b
    if lb - C > 0:
        count += 1

print(count)

Fixed code:
N, M, C = map(int, input().split())
B = list(map(int, input().split()))

count = 0
for i in range(N):
    lst = list(map(int, input().split()))
    lb = 0
    for l,b in zip(lst,B):
        lb += l * b
    if lb + C > 0:
        count += 1

print(count)
Buggy code:
n, m, c = map(int, input().split())
b = list(map(int, input().split()))
a = [list(map(int, input().split())) for i in range(n)]
cnt = 0

for l in a:
    tmp = 0
    for i in range(m):
        tmp += b[i]*a[i]
    tmp += c
    if tmp > 0:
        cnt += 1

print(cnt)

Fixed code:
n, m, c = map(int, input().split())
b = list(map(int, input().split()))
a = [list(map(int, input().split())) for i in range(n)]
cnt = 0

for l in a:
    tmp = 0
    for i in range(m):
        tmp += b[i]*l[i]
    tmp += c
    if tmp > 0:
        cnt += 1

print(cnt)
Buggy code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque
from decimal import *


def lcm(x, y):
    return (x * y) // math.gcd(x, y)


if __name__ == '__main__':
    n,m,c = map(int, input().split())
    b = [int(i) for i in input().split()]

    count = 0
    for i in range(n):
        num=0
        a = [int(i) for i in input().split()]
        
        for i in range(m):
            num +=a[i] *b[i]
        if num >c:
            count+=1
    print(count)


Fixed code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque
from decimal import *


def lcm(x, y):
    return (x * y) // math.gcd(x, y)


if __name__ == '__main__':
    n,m,c = map(int, input().split())
    b = [int(i) for i in input().split()]

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

        for i in range(m):
            num +=a[i] *b[i]
        if num >c*(-1):
            count+=1
    print(count)
Buggy code:
n, m, c=map(int, input().split())
b=list(map(int, input().split()))
ac=0
for _ in range(n):
  ans=c
  a=list(map(int, input().split()))
  for i in range(n):
    ans+=a[i]*b[i]
  if ans>0:
    ac += 1
print(ac)

Fixed code:
n, m, c=map(int, input().split())
b=list(map(int, input().split()))
ac=0
for _ in range(n):
  ans=c
  a=list(map(int, input().split()))
  for i in range(m):
    ans+=a[i]*b[i]
  if ans>0:
    ac += 1
print(ac)
Buggy code:
n, m, c = map(int, input().split())
b = list(map(int, input().split()))
num = c
count = 0
for i in range(n):
  a = list(map(int, input().split()))
  for j in range(m):
    num += a[j]*b[j]
  print(num)
  if num > 0:
    count += 1
    num = c
  else:
    num = c
print(count)

Fixed code:
n, m, c = map(int, input().split())
b = list(map(int, input().split()))
num = c
count = 0
for i in range(n):
  a = list(map(int, input().split()))
  for j in range(m):
    num += a[j]*b[j]
  if num > 0:
    count += 1
    num = c
  else:
    num = c
print(count)
Buggy code:
N, M, C = map(int, input().split())
B = list(map(int, input().split()))
i = 0
count = 0
while i < N:
    A = list(map(int, input().split()))
#    print ('A', A)
    j = 1
    ans = C
    while j <= M:
        ans +=  A[j-1] * B[j-1]
        j += 1
#    print (ans)
    if ans > 0:
        count += 1
    i += 1
print ('Count', count) 

Fixed code:
N, M, C = map(int, input().split())
B = list(map(int, input().split()))
i = 0
count = 0
while i < N:
    A = list(map(int, input().split()))
#    print ('A', A)
    j = 1
    ans = C
    while j <= M:
        ans +=  A[j-1] * B[j-1]
        j += 1
#    print (ans)
    if ans > 0:
        count += 1
    i += 1
print (count)
Buggy code:
b = list(map(int, input().split()))
codes = [list(map(int, input().split())) for _ in range(N)]

res = 0
for code in codes:
    s = C    
    for i in range(M):
        s += (code[i] * b[i])
    if s > 0:
        res += 1

print(res)


Fixed code:
N, M, C = map(int, input().split())
b = list(map(int, input().split()))
codes = [list(map(int, input().split())) for _ in range(N)]

res = 0
for code in codes:
    s = C
    
    for i in range(M):
        s += (code[i] * b[i])

    if s > 0:
        res += 1

print(res)
Buggy code:
# -*- coding: utf-8 -*-

n, m, c = map(int, input().split())
numB = [int(s) for s in input().split()]
codeA = []
for _ in range(n):
    codeA.append([int(t) for t in input().split()])
    
count = 0
for a in codeA:
    total = 0
    for i in range(m):
        total += a[i]*numB[i]
        if total + c > 0:
            count += 1
            
print(count)

Fixed code:
# -*- coding: utf-8 -*-

n, m, c = map(int, input().split())
numB = [int(s) for s in input().split()]
codeA = []
for _ in range(n):
    codeA.append([int(t) for t in input().split()])
    
count = 0
for a in codeA:
    total = 0
    for i in range(m):
        total += a[i]*numB[i]
    if total + c > 0:
        count += 1
            
print(count)
Buggy code:
nmc = input().split()
lstb = input().split()
a = []
for n in range(int(nmc[0])):
    a.append(input().split())
total = 0
count = 0
for n in range(int(nmc[0])):
    for m in range(int(nmc[1])):
        total += (int(lstb[m]) * int(a[n][m]))
    if total - int(nmc[2]) > 0:
        count += 1
    total = 0
print(count)

Fixed code:
nmc = input().split()
lstb = input().split()
a = []
for n in range(int(nmc[0])):
    a.append(input().split())
total = 0
count = 0
for n in range(int(nmc[0])):
    for m in range(int(nmc[1])):
        total += (int(lstb[m]) * int(a[n][m]))
    if total + int(nmc[2]) > 0:
        count += 1
    total = 0
print(count)
Buggy code:
n,m,c=map(int,input().split())
b=list(map(int,input().split()))
lista=[list(map(int,input().split())) for x in range(n)]
ans=0
for i in range(1,n+1):
  sum=0
  for j in range(1,m+1):
    sum+=lista[j-1][j-1]*b[j-1]
  if sum+c>0:
    ans+=1
print(ans)


Fixed code:
n,m,c=map(int,input().split())
b=list(map(int,input().split()))
lista=[list(map(int,input().split())) for x in range(n)]
ans=0
for i in range(1,n+1):
  sum=0
  for j in range(1,m+1):
    sum+=lista[i-1][j-1]*b[j-1]
  if sum+c>0:
    ans+=1
print(ans)
Buggy code:
def is_okay(A, B, C):
    sum = 0
    for i in range(len(B)):
        sum += A[i] * B[i]

    return sum > 0

N, M, C = map(int, input().split())
B = tuple(map(int, input().split()))

answer = 0
for _ in range(N):
    A = tuple(map(int, input().split()))
    answer += is_okay(A, B, C)

print(answer)


Fixed code:
def is_okay(A, B, C):
    sum = 0
    for i in range(len(B)):
        sum = sum + A[i] * B[i]

    return sum + C > 0

N, M, C = map(int, input().split())
B = tuple(map(int, input().split()))

answer = 0
for _ in range(N):
    A = tuple(map(int, input().split()))
    answer = answer + is_okay(A, B, C)

print(answer)
Buggy code:
from sys import stdin


def na():
    return map(int, stdin().split())


n, _, c = na()
bs = na()

cnt = 0
for _ in range(n):
    if sum(x * y for x, y in zip(na(), bs)) > -c:
        cnt += 1

print(cnt)


Fixed code:
from sys import stdin


def na():
    return map(int, stdin.readline().split())


n, _, c = na()
bs = tuple(na())

cnt = 0
for _ in range(n):
    if sum(x * y for x, y in zip(na(), bs)) > -c:
        cnt += 1

print(cnt)
Buggy code:
N, M, C = map(int, input().split())
B = list(map(int, input().split()))
cnt = 0
for _ in range(N):
  A = list(map(int, input().split()))
  cnt += int(sum(A[i] * B[i] for i in range(M)) > 0)
print(cnt)

Fixed code:
N, M, C = map(int, input().split())
B = list(map(int, input().split()))
cnt = 0
for _ in range(N):
  A = list(map(int, input().split()))
  cnt += int(sum([A[i] * B[i] for i in range(M)], C) > 0)
print(cnt)
Buggy code:
n,m,c=map(int,input().split())
B=list(map(int,input().split()))
count=0
for i in range(n):
  p=c
  A=list(map(int,input().split()))
  for j in range(m):
    p+=A[j]*B[j]
    if p>0:count+=1
print(count)

Fixed code:
n,m,c=map(int,input().split())
B=list(map(int,input().split()))
count=0
for i in range(n):
  p=c
  A=list(map(int,input().split()))
  for j in range(m):
    p+=A[j]*B[j]
  if p>0:count+=1
print(count)