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.
fromcollectionsimportCounterX=int(input())#numofshoesshoe_stock=Counter(list(map(int,input().split(" "))))num_of_customers=int(input())earned=0foriinrange(num_of_customers):cust_size,cust_price=list(map(int,input().split(" ")))#if size is buyable then -1 to size and plus priceifshoe_stock[cust_size]:shoe_stock[cust_size]-=1earned+=cust_priceprint(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 →