Need a unique gift idea?
A Pastebin account makes a great Christmas gift


a guest Dec 6th, 2018 45 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. d = dict()
  2. for i in range(int(input())):
  3.     family, point = input().split()
  4.     d[family] = d.get(family, 0) + int(point)
  5. [print(key, d[key]) for key in sorted(d)]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand