编辑代码

// 设置标准输入接口
const rl = require("readline").createInterface({ input: process.stdin });
var iter = rl[Symbol.asyncIterator]();
const readline = async () => (await iter.next()).value;

void (async function () {
  let [x, y, t] = (await readline()).split(" ").map(Number);
  let xFort = true;
  let yFort = true;
  let time = 0;
  while (time < t) {
    let [x1, y1] = [x + 50, y + 25];
    if (x1 === 800 || x == 0) {
      xFort = !xFort;
    }
    if (y1 == 600 || y == 0) {
      yFort = !yFort;
    }
    if (xFort) {
      x++;
    } else {
      x--;
    }
    if (yFort) {
      y++;
    } else {
      y--;
    }
    time++;
  }
  console.log(x, y);
})();