๐ JavaScript/๋ฐฑ์ค
[JS] 10809
let fs = require('fs'); let path = process.platform === 'linux' ? '/dev/stdin' : './input.txt'; let input = fs.readFileSync(path).toString().trim(); function solve(input) { let answerArray = new Array(); for (i = 97; i
[JS] 1065
const fs = require('fs'); const path = process.platform === 'linux' ? '/dev/stdin' : './input.txt'; const input = Number(fs.readFileSync(path).toString().trim()); function solve(input) { if (input < 100) { return input; } else if (input
[JS] 4673
const NUMBER = 10000; function solve(number) { let arr = new Array(); for (i = 1; i Number(x)).reduce((acc, cur) => acc + cur); arr.push(sum); } for (i = 1; i
[JS] 10818
const fs = require('fs'); const path = process.platform === 'linux' ? '/dev/stdin' : './input.txt'; const input = fs.readFileSync(path).toString().split('\n'); function solve(input) { const count = Number(input[0]); const array = input[1].split(' ').map((value) => Number(value)); console.log(`${Math.min(...array)} ${Math.max(...array)}`); // array...
[JS] 3052
const fs = require('fs'); const path = process.platform === 'linux' ? '/dev/stdin' : './input.txt'; const input = fs .readFileSync(path) .toString() .trim() .split('\n') .map((x) => Number(x)); const inputDiv = input.map((x) => x % 42); const answer = new Set(inputDiv); console.log([...answer].length); ๋ฐฑ์ค trim() ์ ๋ฌด์ ๋ฐ๋ผ ์ ๋ต์ด ๋๊ธฐ๋ ์๋๊ธฐ๋ => ์ด์ ๋ฅผ ๋ชจ๋ฅด๊ณ๋ค. ์๋ค ๊ณต๋ฐฑ ์ ๊ฑฐํด์ฃผ๋..