You are viewing a single comment's thread. Return to all comments →
no_of_shoes = int(input()) shoes = input() shoe_list = list(map(int, shoes.split(" "))) no_of_cus = int(input()) profit = 0 for i in range(no_of_cus): choice = input() choice_list = list(map(int, choice.split(" "))) if choice_list[0] in shoe_list: profit += choice_list[1] shoe_list.remove(choice_list[0]) print(profit)
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 →