题解 | 坐标移动
坐标移动
https://www.nowcoder.com/practice/119bcca3befb405fbe58abe9c532eb29
S = input().split(';')
x, y = 0, 0
for e in S:
if len(e) < 2:
continue
direct = e[0]
if e[1:].isdigit():
num = int(e[1:])
if "A" == direct:
x -= num
elif "S" == direct:
y -= num
elif "D" == direct:
x += num
elif "W" == direct:
y += num
print(str(x)+","+str(y))



