Problem: There are N pieces of source code. The characteristics of the i-th code is represented by M integers A_{i1}, A_{i2}, ..., A_{iM}.  Additionally, you are given integers B_1, B_2, ..., B_M and C.  The i-th code correctly solves this problem if and only if A_{i1} B_1 + A_{i2} B_2 + ... + A_{iM} B_M + C > 0.  Among the N codes, find the number of codes that correctly solve this problem.

Submission attempts (in order):
n,m,c = map(int,input().split())
input_b = map(int,input().split())
a_list=[input() for i in range(n)]
for i in range(n):
  answer = c
  count = 0
  aitems = map(int,a_list[i].split())
  for j in range(m):
    answer += input_b[m] * aitems[m]
  if answer > 0:
    count+=1
print count

n,m,c = map(int,input().split())
input_b = map(int,input().split())
while True:
  try:
    list_a=list(map(int,input().split()))
    answer = c
    count = 0
    for i in range(len(list_a)):
		answer += input_b[i] * list_a[i]
		if answer > 0
			count+=1
		print count
	except:
		break;

n,m,c = map(int,input().split())
input_b = map(int,input().split())
a_list=[input() for i in range(n)]
for i in range(n):
  answer = c
  count = 0
  aitems = map(int,a_list[i].split())
  for j in range(m):
    answer += input_b[m] * aitems[m]
  if answer > 0
    count+=1
print count

n,m,c = map(int,input().split())
input_b = map(int,input().split())
list_a=[list(map(int,input().split()))]
for i in range(n):
  answer = c
  count = 0
  lista_item = list_a[i]
  for j in range(m):
    answer += input_b[m] * lista_item[m]
  if answer > 0
    count+=1
print count

n,m,c = map(int,input().split())
input_b = map(int,input().split())
list_a=list(map(int,input().split()))
for i in range(n):
  answer = c
  count = 0
  lista_item = list_a[i]
  for j in range(m):
    answer += input_b[m] * lista_item[m]
  if answer > 0
    count+=1
print count

n,m,c = map(int,input().split())
input_b = map(int,input().split())
a_list=[input() for i in range(n)]
for i in range(n):
  answer = c
  count = 0
  aitems = [map(int,a_list[i].split())]
  for j in range(m):
    answer += input_b[m] * aitems[m]
  if answer > 0
    count+=1
print count

n,m,c = map(int,input().split())
input_b = map(int,input().split())
a_list=[input() for i in range(n)]
for i in range(n):
  answer = c
  count = 0
  aitems = map(int,a_list[i].split())
  for j in range(m):
    answer += input_b[j] * aitems[j]
  if answer > 0:
    count+=1
print count

from sys import stdin
n,m,c = map(int,input().split())
input_b = map(int,input().split())
while True:
	try:
		list_a=list(map(int,input().split()))
		answer = c
		count = 0
		for i in range(len(list_a)):
			answer += input_b[i] * list_a[i]
			if answer > 0
				count+=1
		print count
	except:
		break;

n,m,c = map(int,input().split())
input_b = map(int,input().split())
while True:
  try:
    list_a=list(map(int,input().split()))
    answer = c
    count = 0
    for lista_item in list_a:
      for i in range(len(lista_item)):
        answer += input_b[i] * lista_item[i]
        if answer > 0
          count+=1
    print count
  except:
    break;

n,m,c = map(int,input().split())
input_b = list(map(int,input().split()))
a_list=[input() for i in range(n)]
count = 0
for i in range(n):
  answer = c
  aitems = list(map(int,a_list[i].split()))
  for j in range(m):
    answer += input_b[j] * aitems[j]
  if answer > 0:
    count+=1
print(count)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted