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.
Well, I didn't use Counter()... this seemed pretty easy without it
# Enter your code here. Read input from STDIN. Print output to STDOUT# from collections import Counterno_of_shoes=int(input())size_stocks=list(map(int,input().split(" ")))customers_count=int(input())request_size_bid=[]foriinrange(customers_count):x,y=input().split(" ")request_size_bid.append((int(x),int(y)))profit=0foriinrequest_size_bid:ifi[0]insize_stocks:profit+=i[1]size_stocks.remove(i[0])print(profit)
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 →
Well, I didn't use Counter()... this seemed pretty easy without it