You are viewing a single comment's thread. Return to all comments →
I didnt use collections Counter
from collections import Counter num_shoes = int(input()) shoe_sizes = list(map(int, input().split())) num_customers = int(input()) customer_info = list() for i in range(num_customers): customer_info.append(list(map(int, input().split()))) total = 0 for i in range(num_customers): if customer_info[i][0] in shoe_sizes: total = total + int(customer_info[i][1]) shoe_sizes.remove(customer_info[i][0]) print(total)
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 →
I didnt use collections Counter