题目
思路:
存储判断即可
代码
stu_num,topic_num=map(int,input().split())
score=list(map(int,input().split()))
is_acc=list(map(int,input().split()))
for i in range(stu_num):
total_score=0
anwsers=list(map(int,input().split()))
for j in range(topic_num):
if anwsers[j]==is_acc[j]:
total_score=total_score+score[j]
print(total_score)