You are viewing a single comment's thread. Return to all comments →
X = int(input()) sizes = list(map(int, input().split())) earned = 0 for i in range(int(input())): a,b = map(int, input().split()) if a in sizes: earned += b sizes.remove(a) print(earned)
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 →