백준 자바스크립트 입력1 백준 자바스크립트 입력 방식 메모 ● test case (1줄 \n1줄 기준) good morning hello world! ● test case 받아오기 // 줄 바꿈 기준으로 가져오기 const fs = require('fs'); let input = fs.readFileSync('/dev/stdin').toString().split('\n'); console.log(input); // ['good morning', 'hello world!'] ● test case (여러줄 \n여러줄 기준) case 1 5 1 2 3 4 5 case 2 4 2 3 1 0 0 1 1 1 1 1 0 1 0 1 0 1 1 1 ● test case 받아오기 const solution = (N, data) => { console.log(N); console... 2021. 9. 4. 이전 1 다음