![๐ JavaScript/๋ฐฑ์ค](https://blog.kakaocdn.net/dn/JUV6d/btrFo0twn6x/iNBUgfOeTE7UzTXkpJWUZ0/img.png)
๐ JavaScript/๋ฐฑ์ค
[JS] 2438
const fs = require('fs'); const path = process.platform === 'linux' ? '/dev/stdin' : './input.txt'; const input = Number(fs.readFileSync(path).toString()); function solve(number) { for (i = 1; i
[JS] 15552
const fs = require('fs'); const filePath = process.platform === 'linux' ? '/dev/stdin' : './input.txt'; const input = fs.readFileSync(filePath).toString().split('\n'); // console.log(input); const count = parseInt(input[0]); function solve(count) { let answer = ''; for (let i = 1; i
[JS] 10950
const fs = require('fs'); const filePath = process.platform === 'linux' ? '/dev/stdin' : './input.txt'; const input = fs.readFileSync(filePath).toString().split('\n'); const countNum = parseInt(input[0]); for (i = 1; i
[JS] ๋ฐฑ์ค ์ ๋ ฅ๋ฐ๊ธฐ
const fs = require("fs"); // ๋ฐฑ์ค ํ๋ซํผ์ด ๋ฆฌ๋ ์ค // ๋ฐฑ์ค ์ ์ถ ์์๋ "/dev/stdin" , ํผ์ ํ ์คํธ ํด๋ณผ ๋๋ "./input.txt"์๋ก ๊ฒฝ๋ก ์ง์ const filePath = process.platform === "linux" ? "/dev/stdin" : "./input.txt"; let input = fs.readFileSync(filePath).toString().split("\n"); console.log(input) // input ๋ชจ์ ํ๋ฒ์ฉ ํ์ธํด๋ณด๋ ๊ฒ ์ข์ ๋ฏ // ์ดํ ๊ฐ ๋ฌธ์ ์ input์ ๋ง๊ฒ ๊ฐ๊ณตํด์ ๋ฌธ์ ํ๊ธฐ ์งํ // ๊ฐ๋ฅํ๋ฉด ๋ฌธ์ ๋ function์ ๋ง๋ค์ด์ ํ์ ์ฐธ๊ณ : https://velog.io/@dishate