题解 | #坐标移动#

坐标移动

https://www.nowcoder.com/practice/119bcca3befb405fbe58abe9c532eb29

n =input().split(';')
hashmap={'A':0,'W':0,'D':0,'S':0}
for i in n :
    key,value=i[0:1:1],i[1::]
    if value.isdigit():
        hashmap[key]=hashmap[key]+int(value)
result ='%s,%s'%(hashmap['D']-hashmap['A'],hashmap['W']-hashmap['S'])
print(result)

全部评论

相关推荐

牛客83265014...:完了,连现在都没开始面,13号投的是不是晚了
秋招的第一个offer,...
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

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