const readline = require("readline"); const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); const lines = []; rl.on("line", function (line) { if (line) { lines.push(line); } }) rl.on("close", function () { calc(lines); }) let cnt = 0; const calc =...