목록BOJ (74)
언젠가는 펼쳐 볼 아카이브
사용언어 : javascript - node.js #제출 코드 const fs = require('fs'); const filePath = process.platform === 'linux' ? '/dev/stdin' : './input.txt'; const input = fs .readFileSync(filePath) .toString() .trim() .split('\n') .map((item) => +item); solution(input); function solution(list) { let remainList = []; for (let i = 0; i < list.length; i++) { let remainNum = list[i] % 42; if (remainList.length === 0)..
사용언어 : javascript - node.js #제출코드 const fs = require('fs'); const filePath = process.platform === 'linux' ? '/dev/stdin' : './input.txt'; const input = fs .readFileSync(filePath) .toString() .split('\n') .map((item) => +item); solution(input); function solution(attend) { for (let i = 1; i < 31; i++) { if (!attend.includes(i)) { console.log(i); } } }
사용언어 : javascript - node.js #제출코드 const fs = require('fs'); const filePath = process.platform === 'linux' ? '/dev/stdin' : './input.txt'; const input = fs.readFileSync(filePath).toString().split('\n'); solution(input); function solution(input) { const data = input[0].split(' ').map((item) => +item); const n = data[0]; const m = data[1]; let answer = ''; let basket = []; for (let i = 0; i < n; i+..
사용 언어 : javascript - node.js #제출 코드 const fs = require('fs'); const filePath = process.platform === 'linux' ? '/dev/stdin' : './input.txt'; const input = fs.readFileSync(filePath).toString().split('\n'); solution(input); function solution(input) { const data = input[0].split(' ').map((item) => +item); const n = data[0]; const m = data[1]; let answer = ''; let basket = []; for (let i = 0; i < n; ..