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.
if (0 < x < 10**3) or (0 < n <= 10**3) or (20 < x_i < 100) or (2 < shoeSize < 20):
for _ in range(n):
size, price = map(int, input().split())
if size in shoeSize:
total += price
shoeSize.remove(size)
print(total)
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 →
my code without using any imports or libraries
x = int(input())
shoeSize = list(map(int, input().split()))
n = int(input())
total = 0
if (0 < x < 10**3) or (0 < n <= 10**3) or (20 < x_i < 100) or (2 < shoeSize < 20): for _ in range(n): size, price = map(int, input().split()) if size in shoeSize: total += price shoeSize.remove(size) print(total)