JavaScript 썸네일형 리스트형 [NodeJS] 백준 9019 DSLR /** * @link https://www.acmicpc.net/problem/9019 * @name DSLR */ const readline = require('readline'); const strToNumberArr = (str) => str.split(' ').map(Number); const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); const input = []; rl.on('line', (line) => { input.push(line); }).on('close', () => { input.shift(); const result = solution(input.map(strToNumberAr.. 더보기 [NodeJS] 백준 2407 조합 /** * @link https://www.acmicpc.net/problem/2407 * @name 조합 */ const readline = require('readline'); const strToNumberArr = (str) => str.split(' ').map(Number); const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); const input = []; rl.on('line', (line) => { input.push(line); }).on('close', () => { const [n, m] = strToNumberArr(input.shift()); const result = sol.. 더보기 [NodeJS] 백준 10026 적록색약 /** * @link https://www.acmicpc.net/problem/10026 * @name 적록색약 */ const readline = require('readline'); const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); const input = []; rl.on('line', (line) => { input.push(line); }).on('close', () => { const n = Number(input.shift()); const result = solution( n, input.map((v) => v.split('')), ); console.log(result.join(' .. 더보기 [NodeJS] 백준 7576 토마토 /** * @link https://www.acmicpc.net/problem/7576 * @name 토마토 */ const readline = require('readline'); const strToNumberArr = (str) => str.split(' ').map(Number); const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); const input = []; rl.on('line', (line) => { input.push(line); }).on('close', () => { const [m, n] = strToNumberArr(input.shift()); const result = so.. 더보기 [NodeJS] 백준 7569 토마토 /** * @link https://www.acmicpc.net/problem/7569 * @name 토마토 */ const readline = require('readline'); const strToNumberArr = (str) => str.split(' ').map(Number); const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); const input = []; rl.on('line', (line) => { input.push(line); }).on('close', () => { const [m, n, h] = strToNumberArr(input.shift()); const arr = in.. 더보기 [NodeJS] 백준 5430 AC /** * @link https://www.acmicpc.net/problem/5430 * @name AC */ const readline = require('readline'); const strToNumberArr = (str) => str.split(' ').map(Number); const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); const input = []; rl.on('line', (line) => { input.push(line); }).on('close', () => { const t = Number(input.shift()); const strFuncs = []; const nums.. 더보기 [NodeJS] 프로그래머스 피보나치 수 const solution = (n) => { const memo = [0, 1]; if (n < memo) { return memo[n]; } for (let i = memo.length; i 더보기 [NodeJS] 프로그래머스 최댓값과 최솟값 const solution = (s) => { let max = Number.MIN_SAFE_INTEGER; let min = Number.MAX_SAFE_INTEGER; for (const c of s.split(' ').map(Number)) { max = Math.max(c, max); min = Math.min(c, min); } return `${min} ${max}`; }; 더보기 이전 1 2 3 4 5 6 ··· 18 다음