Aggregate and Count Aggregate and Count
The mission is in Blocked Mode. Access to the solutions is blocked for a day or two (even after you share your own), until we'll have enough solutions for you to check. All users who've solved the mission will get the notifications about their opening.

You have a list of values where each element is a list of two values. First is a name and the second one is counter.

What you need to do is to aggregate those values into a dict, which is easy, you can simply use function disc for that. But, name is not unique, so if you find more that one elements with the same name, you should sum their counters in the aggregated dict.

Input: List of list of two elelemnts - str and int.

Output: Int.


assert aggregate_and_count([["a", 1], ["b", 2]]) == {"a": 1, "b": 2}
assert aggregate_and_count([["a", 1], ["a", 2]]) == {"a": 3}
assert aggregate_and_count([["a", 1], ["b", 2], ["c", 3], ["a", 5]]) == {
    "a": 6,
    "b": 2,
    "c": 3,
assert aggregate_and_count([["a", 1]]) == {"a": 1}