안녕하세요
const input = require("fs") .readFileSync(process.platform === "linux" ? "dev/stdin" : "input.txt") .toString() .trim() .split("\n") .map((el) => el.split(" ").map((val) => parseInt(val)));
입력을 이렇게 받아보시길 바랍니다 ! :)
trim () 을 붙여줬습니다.
11022번 - A+B - 8
.readFileSync(process.platform === "linux" ? "dev/stdin" : "input.txt") 이건 또 처음 알게되었네요..
아,, 오류가 날 수 있어서 다들 trim을 붙이는거였나보네요
감사합니다.
댓글을 작성하려면 로그인해야 합니다.
thecharmingpark 2년 전
맞다고 생각되는건 제 착각이겠죠??...