๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

ํ”„์—” ๊ณต๋ถ€

(151)
[๋ฐฑ์ค€/Node.js] 8393๋ฒˆ ํ’€์ด || JavaScript let input = require('fs').readFileSync('/dev/stdin').toString().split(" "); let loop = +input[0]; console.log(loop * (loop + 1) / 2); const input = require('fs').readFileSync('./input.txt').toString(); let loop = Number(input[0]); let sum = 0; for (i = 0; i
[๋ฐฑ์ค€/Node.js] 10950๋ฒˆ ํ’€์ด || JavaScript let input = require('fs').readFileSync('/dev/stdin').toString().split("\n"); const loop = input[0]; for (let i = 1; i
[๋ฐฑ์ค€/Node.js] 2739๋ฒˆ ํ’€์ด || JavaScript let input = require('fs').readFileSync('/dev/stdin').toString().split(" ").map(Number); const num = input[0]; for (i = 1; i < 10; i++) { console.log(`${num} * ${i} = ${num * i}`); }
[๋ฐฑ์ค€/Node.js] 2480๋ฒˆ ํ’€์ด || JavaScript let input = require('fs').readFileSync('/dev/stdin').toString().split(" ").map(Number); const num1 = input[0]; const num2 = input[1]; const num3 = input[2]; if (num1 === num2 && num2 === num3) { console.log(10000 + num1 * 1000) } else if (num1 === num2 || num1 === num3) { console.log(1000 + num1 * 100); } else if (num2 === num3) { console.log(1000 + num2 * 100); } else { if (num1 > num2) { num1 ..
[๋ฐฑ์ค€/Node.js] 2525๋ฒˆ ํ’€์ด || JavaScript let input = require('fs').readFileSync('/dev/stdin').toString().split("\n"); const currentTime = input[0].split(" ").map(Number); const currentTimeH = currentTime[0] == 0 ? 24 : currentTime[0]; const currentTimeM = currentTime[1]; const cookingTime = Number(input[1]); const afterCooking = currentTimeH * 60 + currentTimeM + cookingTime; const afterCookingHour = Math.floor(afterCooking / 60); cons..
[๋ฐฑ์ค€/Node.js] 2884๋ฒˆ ํ’€์ด || JavaScript let input = require('fs').readFileSync('/dev/stdin').toString().split(" "); input = input.map(Number); const hour = input[0] == 0 ? 24 : input[0]; const minutes = input[1]; const backTo45Minutes = hour * 60 + minutes - 45; const earlyHour = Math.floor(backTo45Minutes / 60); const earlyMinites = backTo45Minutes - earlyHour * 60; console.log(earlyHour == 24 ? 0 : earlyHour, earlyMinites); ๐ŸŒฑ ์‹œ๊ฐ„์ด 0์‹œ..
[๋ฐฑ์ค€/Node.js] 11382๋ฒˆ ํ’€์ด || JavaScript let input = require('fs').readFileSync('/dev/stdin').toString().split(" "); input = input.map((item) => Number(item)); console.log(input[0] + input[1] + input[2]); ์ˆซ์ž ์„ธ๊ฐœ๋ฅผ ๋ฐ›์•„์„œ ๋”ํ•œ ๊ฐ’์„ ์ถœ๋ ฅ. ์ž…์ถœ๋ ฅ ๋‹จ๊ณ„ ๋!
[๋ฐฑ์ค€/Node.js] 14681๋ฒˆ ํ’€์ด || JavaScript let input = require('fs').readFileSync(0).toString().split('\n'); function quadrant(a, b) { if (a > 0) { if (b > 0) { console.log(1); } else if (b 0) { console.log(2); } else if (b 0) input[1] > 0 ? console.log(1) : console.log(4);..

728x90
๋ฐ˜์‘ํ˜•