const read = readline(); const reg = /^(A|D|W|S){1}[0-9]{1,2}$/; const arr = read.split(";").filter(item=>reg.test(item)); const res = [0,0] for(let i=0;i<arr.length;i++){ var dir = arr[i][0]; var step = Number(arr[i].slice(1)); switch(dir){ &n...