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

合并表记录

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
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务