题解 | 坐标移动
a = ['A','S','W','D'] heng = 0 zong = 0 while True: try: s = input() ls = [i for i in s.split(';') if i != ''] # 舍掉;;的情况 for i in ls: if i[0] in a and i[1:].isdigit() and 1<=int(i[1:])<=99: if i[0] == 'A': heng -= int(i[1:]) if i[0] == 'D': heng += int(i[1:]) if i[0] == 'W': zong += int(i[1:]) if i[0] == 'S': zong -= int(i[1:]) print(f'{heng},{zong}') except: break