Items X40885


Statement
 

pdf   zip

html

There are a number of items that are part of an adventure game. Print the list of items in the appropriate format.

Input

The input starts with an integer N denoting the number of items. The next N lines are on the format “<name>–<level>”, where <name> is the name of the item and <level> is its required level.
Output

For each item in the order they appear in the input, print one line:
Item: XXX [YYY]
Here, XXX is the name of the item and YYY is its required level.

Public test cases
  • Input

    5
    Appetizing Apple-0
    Tricky Trap-2
    Potent Potion-1
    Bedazzling Bomb-3
    Stinging Sword-1
    

    Output

    Item: Appetizing Apple [0]
    Item: Tricky Trap [2]
    Item: Potent Potion [1]
    Item: Bedazzling Bomb [3]
    Item: Stinging Sword [1]
    
  • Information
    Author
    Anders Jonsson
    Language
    English
    Official solutions
    C++
    User solutions
    C++