백준1 1076. 저항 - Node.js const fs = require('fs');const file_path = process.platform === 'linux' ? 'dev/stdin' : `${__dirname}/input.txt`const input = fs.readFileSync(file_path).toString().trim().replace(/\r/g, '').split('\n');/** * @param {string} input * @returns */const solution = (input) => { const [f_key, s_key, pow_key] = input; const resistance = ['black', 'brown', 'red', 'orange', 'yellow', 'green', 'blu.. 2024. 9. 12. 이전 1 다음