题解 | #记票统计#

记票统计

http://www.nowcoder.com/practice/3350d379a5d44054b219de7af6708894

i1 = int(input())
lt1 = input().split( )
i2 = int(input())
lt2 = input().split( )

Invalid = 0

for k in lt2:
    if k not in lt1:
        Invalid=Invalid+1
for w in lt1:
    print(w+' : '+str(lt2.count(w)))
print('Invalid :',Invalid)

【牛客站内】华为机试题练习记录

全部评论

相关推荐

10-17 23:18
已编辑
西北农林科技大学 Web前端
独行m:给25可以试试,但他只能给12,那就是纯纯的事精
秋招,不懂就问
点赞 评论 收藏
分享
迷茫的大四🐶:价格这么低都能满了?
点赞 评论 收藏
分享
评论
2
2
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务