문제
11718번: 그대로 출력하기
입력이 주어진다. 입력은 최대 100줄로 이루어져 있고, 알파벳 소문자, 대문자, 공백, 숫자로만 이루어져 있다. 각 줄은 100글자를 넘지 않으며, 빈 줄은 주어지지 않는다. 또, 각 줄은 공백으로 시
www.acmicpc.net
정답
let fs = require("fs");
let filePath = process.platform === "linux" ? "/dev/stdin" : "test.txt";
let input = fs.readFileSync(filePath).toString();
console.log(input);
let fs = require("fs");
let filePath = process.platform === "linux" ? "/dev/stdin" : "test.txt";
let input = fs
.readFileSync(filePath)
.toString()
.split("\n")
.map(x => console.log(x));