Защо Judge ми дава 0/100 на задача 4. Storage?
Това е моя код https://pastebin.com/0CH2MUE2.
Ето и условието на задачата:
4.Storage
Write a function that takes a certain number of items and their quantity. If the same item appears more than once, add the new amount to the existing one. At the end print all the items and their amount without sorting them. The input comes as array of strings. Try using a Map().
Example
Input |
Output |
['tomatoes 10', 'coffee 5', 'olives 100', 'coffee 40'] |
tomatoes -> 10 coffee -> 45 olives -> 100 |
Много благодаря. Научих много полезни неща.