题解 | #坐标移动#
坐标移动
http://www.nowcoder.com/practice/119bcca3befb405fbe58abe9c532eb29
a = 0
b = 0
c = input().split(';')
for item in c:
if item[1:].isdigit():
if item[0] == 'A':
a -= int(item[1:])
elif item[0] == 'D':
a += int(item[1:])
elif item[0] == 'W':
b += int(item[1:])
elif item[0] == 'S':
b -= int(item[1:])
print(str(a)+','+str(b))
b = 0
c = input().split(';')
for item in c:
if item[1:].isdigit():
if item[0] == 'A':
a -= int(item[1:])
elif item[0] == 'D':
a += int(item[1:])
elif item[0] == 'W':
b += int(item[1:])
elif item[0] == 'S':
b -= int(item[1:])
print(str(a)+','+str(b))

