Задача A miner stack
Здравейте,
какъв е проблема в решението ми? Ето и условието:
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, unitll you receive “stop” command.
Print the resources and their quantities in format:
{resource} –> {quantity}
The quantities inputs will be in the range [1 … 2 000 000 000]
ето и решението:
http://pastebin.com/1kQd4YcC