题解 | 坐标移动
坐标移动
https://www.nowcoder.com/practice/119bcca3befb405fbe58abe9c532eb29
while True: try: s = input().split(";") point = [0, 0] std = ["A", "S", "W", "D"] for i in s: if not 2 <= len(i) <= 3: continue a = i[0] if not i[1:].isdigit(): continue b = int(i[1:]) if a in std: if a == "A": point[0] -= b elif a == "D": point[0] += b elif a == "S": point[1] -= b elif a == "W": point[1] += b print(",".join(map(str, point))) except: break