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.
# Enter your code here. Read input from STDIN. Print output to STDOUTX=int(input())strshoes=input()N=int(input())shoe_list=[int(x)forxinstrshoes.split(" ")]total_price=0forcusinrange(0,N):A=input()size_price=[int(a)forainA.split(" ")]ifsize_price[0]inshoe_list:shoe_list.remove(size_price[0])total_price+=size_price[1]print(total_price)
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 →