Created
January 7, 2023 08:07
-
-
Save ktmihs/a3dea936f71357b19d1eda891fdd1df7 to your computer and use it in GitHub Desktop.
readline template (백준 node input, softeer node input)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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