PAT (Basic Level) Practice Python解法 1061 判断题
n, m = input().split()
weight = list(map(int,input().split(' ')))
right = list(map(int,input().split(' ')))
cklist = []
otplst = []
for i in range(int(n)):
cklist.append(list(map(int,input().split(' '))))
for score in cklist:
exam = 0
for i in range(int(m)):
if score[i]==right[i]:
exam = exam + weight[i]
otplst.append(exam)
for each in otplst:
print(each)
452




被折叠的 条评论
为什么被折叠?



