You are viewing a single comment's thread. Return to all comments →
from collections import Counter int(input()) # X, the number of shoes, is unused shoe_sizes = Counter(map(int, input().split())) money = 0 for _ in range(int(input())): buyer = list(map(int, input().split())) buyer_size = buyer[0] if buyer_size in shoe_sizes: shoe_sizes -= Counter([buyer_size]) money += buyer[1] print(money)
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 →