백준1 백준 nodejs 기준 기본코드 실행소스 백준에서 알고리즘 문제를 풀때 nodejs 를 이용할때 사용되는 소스코드이다. 제출용 + 로컬 (리눅스) 양쪽에서 둘다 동작한다 const fs = require("fs"); const filePath = process.platform === "linux" ? "/dev/stdin" : "./input.txt"; let input = fs.readFileSync(filePath).toString().split("\n"); //console.log(input); input = input[0]; //console.log(input); input = input.split(" ").map((item) => +item); //console.log(input); exe(input[0], input[1]); func.. 2022. 8. 3. 이전 1 다음