Skip to content

Instantly share code, notes, and snippets.

@ktmihs
Created January 7, 2023 08:07
Show Gist options
  • Save ktmihs/a3dea936f71357b19d1eda891fdd1df7 to your computer and use it in GitHub Desktop.
Save ktmihs/a3dea936f71357b19d1eda891fdd1df7 to your computer and use it in GitHub Desktop.
readline template (백준 node input, softeer node input)
const readline = require('readline');
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
});
const input = [];
const solution = () => {
let answer = '';
console.log(answer); // 종료 시, 출력
};
rl.on('line', line => {
input.push(line);
});
rl.on('close', () => {
solution();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment