Sum of Dictionary Values

Python Easy 3 views
Back to Questions

Problem Description

Read n pairs key and integer value. Add all values and output total sum. Keys may repeat, still add every time.

Input Format

First line n. Next n lines: key value.

Output Format

One integer sum.

Sample Test Case

Input:
3 x 5 y -2 x 10
Output:
13

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next