A miner task
Здравейте,
Можете ли да ме посъветвате, какво пропускам, че получвам 75/100 в тази задача:
You are given a sequence of strings, each on a new line. Every odd line on the console is representing a resource (e.g. Gold, Silver, Copper, and so on) , and every even – quantity. Your task is to collect the resources and print them each on a new line.
Print the resources and their quantities in format:
{resource} –> {quantity}
The quantities inputs will be in the range [1 … 2 000 000 000]
Examples
Input |
Output |
Gold 155 Silver 10 Copper 17 stop |
Gold -> 155 Silver -> 10 Copper -> 17 |
Това е кодът:
http://pastebin.com/bQ1qf5hs
judge.softuni.bg:
https://judge.softuni.bg/Contests/Practice/Index/209#2