8说了,浅浅压一压行[doge]
pos = [0,0] for op in input().split(';'): if op and op[0] in ['A','S','W','D'] and op[1:].isdigit() and 0 < int(op[1:]) < 100: pos[0] += int(op[1:]) * {'A' : -1, 'D' : 1}.get(op[0],0) pos[1] += int(op[1:]) * {'S' : -1, 'W' : 1}.get(op[0],0) print(','.join([str(x) for x in pos]))
#牛客春招刷题训练营# + 链接