题解 | #坐标移动#
坐标移动
http://www.nowcoder.com/practice/119bcca3befb405fbe58abe9c532eb29
str1=input().split(';')
xais=0
yais=0
for x in str1:
try:
move=int(x[1:])
except:
continue
if move<100: #两位数合法
if x[0]=='A':
xais-=move
elif x[0]=='D':
xais+=move
elif x[0]=='W':
yais+=move
elif x[0]=='S':
yais-=move
print('{},{}'.format(xais,yais)) #格式化