题解 | #记票统计#
记票统计
https://www.nowcoder.com/practice/3350d379a5d44054b219de7af6708894
num=int(input()) candidate=list(input().split(' ')) people=int(input()) tickets=list(input().split(' ')) flag=0 for i in candidate: if i!='': #不能用字符串 print(i+' : '+str(tickets.count(i))) for j in tickets: if j not in candidate: flag=flag+1 print('Invalid : '+str(flag))