题解 | #输入整型数组和排序标识,对其元素按照升序或降序进行排序#
坐标移动
http://www.nowcoder.com/practice/119bcca3befb405fbe58abe9c532eb29
x,y=0,0
str0=input()[:-1]
list1=str0.split(";")
for i in list1:
try:
n=int(i[1:])
if i[0]=="A": x=x-n
elif i[0]=="D": x=x+n
elif i[0]=="S": y=y-n
elif i[0]=="W": y=y+n
else: pass
except:
pass
x=str(x)
y=str(y)
print(x+","+y)