题目不难 就是要仔细
坐标移动
http://www.nowcoder.com/questionTerminal/119bcca3befb405fbe58abe9c532eb29
while True: try: pos = [0,0] s = input().split(';') for op in s: if len(op) == 0: continue elif len(op)==1: continue elif len(op)>1: if not op[0].isalpha(): continue else: op_direction = op[0] step = '' for i in op[1:]: if i.isdigit(): step += i else: break if len(step)>=1: step = int(step) else: continue if op_direction == 'W': pos[1] += step elif op_direction == 'S': pos[1] -= step elif op_direction == 'A': pos[0] -= step elif op_direction == 'D': pos[0] += step print('{},{}'.format(pos[0],pos[1])) except: break