题解 | #机器人的运动范围#
合并表记录
http://www.nowcoder.com/practice/de044e89123f4a7482bd2b214a685201
n = int(input())
dic = {}
for i in range(n):
key,value = map(int,input().split(' '))
dic[key] = dic.get(key,0)+value
for i in sorted(dic):
print(i,dic[i])
