SHARE
TWEET

Untitled

a guest Dec 6th, 2018 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top