题解 | #机器人的运动范围#

合并表记录

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])

全部评论

相关推荐

头像
点赞 评论 收藏
转发
点赞 2 评论
分享
牛客网
牛客企业服务