2792 - 2023GEC1506 - Dictionary Practice(Lab Practice) Scoreboard

Time

2023/05/01 12:30:00 2023/05/01 15:30:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
13903 GEC1506 - Basic - Dictionary practice

13903 - GEC1506 - Basic - Dictionary practice   

Description

 

Given multiple line of input, where each record consists of a person's name and a score they received, the task is to calculate the final score for each person. If a person's name occurs multiple times, their scores should be added together.

 

Input

 

The input will contain multiple lines of text. Each line will contain a person's name and the score they receive. The name and the score will be seperated by a space.

  • 1 <= len(name) <= 10^2
  • -10^2 <= score <= 10^2
  • If the name is same, they should be consider the same person.

Output

 

The outut should contain one line for each person, with their name and the final score they received. The output should be in the order that the names first appeared in the input.

Sample Input  Download

Sample Output  Download

Tags




Discuss