import sys s = input().split(';') #将输入的按照“;”分开单独计算 a = [0, 0] #定义初始坐标 for i in s: #遍历各命令(其中分为空,无效,有效指令) if not i: #分类讨论,空命令坐标不变(空无法按照字符串操作) a = a elif i[0] in ('A', 'D', 'W', 'S') and (i[1:]).isdigit(): #分类有效命令字符串格式:“A/D/W/S”+数字(判断i[1:]均为数字) if i[0] == 'A': a[0] = a[0] - int(i[1:]) elif i[0] == 'D':...