题目
思路:
根据信息统计学生成绩 和每道题错误学生的人数
根据要求输出
代码:
stu_num,topic_num=map(int,(input().split()))
topic_all=[]
for i in range (topic_num):
topic=list(input().split(' '))
topic_all.append(topic)
stu_score=[0]*stu_num
topic_false=[0]*topic_num
for i in range(stu_num):
stu_detail=list(input().split(') ('))
for j in range(topic_num):
stu_each_topic=list(stu_detail[j].replace('(' ,'').replace(')' ,'').split(' '))
topic_choice_num=stu_each_topic[0]
if topic_choice_num!=topic_all[j][2]: #正确选项数量不同
topic_false[j]=topic_false[j]+1
continue
topic_choice_detail=stu_each_topic[1:]
if topic_choice_detail!=topic_all[j][3:]: #正确选项不同
topic_false[j] = topic_false[j] + 1
continue
stu_score[i]=stu_score[i]+int(topic_all[j][0])
for i in stu_score:
print(i)
max_false_value=max(topic_false)
if max_false_value==0:
print('Too simple')
else:
false_print=[max_false_value]
max_index=topic_false.index(max_false_value)
false_print.append(max_index+1)
for i in range(max_index+1,topic_num):
if topic_false[i]==max_false_value:
false_print.append(i+1)
print((' ').join([str(i) for i in false_print]))