const rl = require("readline").createInterface({ input: process.stdin, output: process.stdout, }); let inputArray = []; rl.on("line", function (line) { inputArray.push(line.trim()) }); rl.on("close", () => { solution(inputArray); }); function solut...