题解 | 坐标移动
s = input().split(';')
x = 0
y = 0
for i in range(len(s)):
step = s[i]
if len(step) <= 1 or len(step) >= 4:
continue
step_N = 0
try:
step_N = int(step[1:])
except:
continue
if step[0] == 'A':
x -= step_N
elif step[0] == 'D':
x += step_N
elif step[0] == 'W':
y += step_N
elif step[0] == 'S':
y -= step_N
print('{},{}'.format(x,y))


