We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
# Enter your code here. Read input from STDIN. Print output to STDOUTfromcollectionsimportCounterX=int(input())shoe_sizes=list(map(int,input().split()))N=int(input())total_earned=0foriinrange(N):size,price=map(int,input().split())ifsizeinshoe_sizes:total_earned+=priceshoe_sizes.remove(size)print(total_earned)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
collections.Counter()
You are viewing a single comment's thread. Return to all comments →