Collections.OrderedDict()

Sort by

recency

|

698 Discussions

|

  • + 0 comments

    Welcome the most popular Roblox exploit for Windows that works completely free..This tool is capable of running multiple scripts in popular Roblox games i.e. Blox Fruits, Tower of Hell, Adopt me, Murder Mystery 2, etc Using the Trigon Evo Executor, you can enhance your overall gaming experience by unlocking the additional features not available in the original game.

  • + 0 comments

    Welcome the most popular Roblox exploit for Windows that works completely free..This tool is capable of running multiple scripts in popular Roblox games i.e. Blox Fruits, Tower of Hell, Adopt me, Murder Mystery 2, etc Using the Trigon Evo Executor, you can enhance your overall gaming experience by unlocking the additional features not available in the original game.

  • + 0 comments
    from collections import OrderedDict
    orders = OrderedDict()
    for i in range(int(input())):
        name, _, price = input().rpartition(' ')
        orders[name] = orders.get(name, 0) + int(price)
    [print(*item) for item in orders.items()]
    
  • + 0 comments

    from collections import OrderedDict n = int(input()) item = OrderedDict()

    for _ in range(n): item_name,price = input().rsplit(' ',1) price = int(price)

    if item_name in item:
        item[item_name] += price
    
    else:
        item[item_name] = price
    

    for item_name,item_price in item.items(): print(f'{item_name} {item_price}')

  • + 0 comments

    def col_net(): n = int(input()) dic = {} lis = [] for _ in range(n): line = input().strip() item,price = line.rsplit(' ',1) price = int(price)

        if item in dic:
            dic[item]['quantity'] += 1
        else:
            dic[item] = {'quantity':1,'price':price}
            lis.append(item)
    
    for item in lis:
       net_price = dic[item]['quantity'] * dic[item]['price']
       print(f"{item} {net_price}")
    

    col_net()