๐ JavaScript/๋ฐฑ์ค
[JS] 10757
const fs = require('fs'); const path = process.platform === 'linux' ? '/dev/stdin' : './data.txt'; const input = fs.readFileSync(path).toString().trim().split(' '); function solve(input) { let [A, B] = input.map((x) => BigInt(x)); return String(A + B); } console.log(solve(input)); ๋ฐฑ์ค ์ซ์๊ฐ ๋๋ฌด ํด ๋, ์ ํ์ด ์๋ค๋ ๊ฒ ex) 9223372036854775807์ ๊ฒฝ์ฐ 9223372036854776000์ผ๋ก ๋..
[JS] 2839
const fs = require('fs'); const path = process.platform === 'linux' ? '/dev/stdin' : './data.txt'; const input = Number(fs.readFileSync(path).toString().trim()); function solve(input) { let count = 0; if (input === 3) { return 1; } if (input < 5 || input === 7) { return -1; } for (let i = 0; i * 3 input) { console.log(-1); break; } count++; input -= 3; } ๋ค๋ฅธ ํ์ด
[JS] 2775
// 2 // 1 // 3 // 2 // 3 // ์ธต์ 0์ธต๋ถํฐ, ํธ์๋ 1ํธ๋ถํฐ const fs = require('fs'); const path = process.platform === 'linux' ? '/dev/stdin' : './data.txt'; const input = fs .readFileSync(path) .toString() .trim() .split('\n') .map((x) => Number(x)); function solve(input) { const caseCount = input.shift(); for (let i = 0; i < caseCount; i++) { let kFloor = input.shift(); let nHosu = input.shift() - 1; // 1ํธ..
[JS] 10250
const fs = require('fs'); const path = process.platform === 'linux' ? '/dev/stdin' : './data.txt'; const input = fs.readFileSync(path).toString().trim().split('\n'); function solve(input) { let caseCount = Number(input[0]); for (i = 1; i Number(x)); let floor = 0; if (N % H === 0) { floor = H; } else { floor = N % H; } let ho = Math.ceil(N / H); if (ho < 1..
[JS] 2869
const fs = require('fs'); const path = process.platform === 'linux' ? '/dev/stdin' : './data.txt'; const input = fs .readFileSync(path) .toString() .split(' ') .map((x) => Number(x)); function solve(input) { const [A, B, V] = input; let answer = Math.ceil((V - B) / (A - B)); return answer; } console.log(solve(input)); ๋ฐฑ์ค python ๋ ํค๋งธ๋ ๊ฒ ๊ธฐ์ต๋๋ ๋ฌํ์ด ๋ฌธ์ ๋จ์ํ ์ํ์ผ๋ก ๋ถ๋ฑ์์ ์ธ์ฐ๊ณ ๊ทธ์ ๋ฐ๋ฅธ ๋ฐ๋ณต๋ฌธ์ ์๊ฐํ๊ธฐ ๋ง๋ จ์ธ๋ฐ, 2๊ฐ์ง๋ง ์์์ฐจ..