일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- HTTP
- 타입 챌린지
- dfs
- 프로그래머스
- socket
- Algorithm
- 소켓
- 가천대
- TCP
- type challenge
- 알고리즘
- ip
- 수학
- BFS
- 타입스크립트
- 자바스크립트
- 그래프
- Crawling
- 레벨 1
- 문자열
- dp
- javascript
- 프로그래머스 레벨 2
- 백준
- 쉬운 문제
- 크롤링
- Node.js
- HTTP 완벽 가이드
- typescript
- Nestjs
- Today
- Total
목록쉬운 문제 (11)
kakasoo
const readline = require("readline"); const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); rl.on("line", (line) => { main(line); }); /** * * @param {string} line */ const main = (line) => { let small = 0; let big = 0; let num = 0; let space = 0; for (let i = 0; i < line.length; i++) { const cur = line[i]; if (!isNaN(cur - 0)) { if (cur === " ") { space++; } els..
const readline = require("readline"); const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); rl.on("line", (line) => { let answer = ""; for (let i = 0; i < line.length; i++) { answer += line[i]; if (answer.length === 10) { console.log(answer); answer = ""; } } console.log(answer); });
// 백준 11365번 !밀비 급일을 풀었습니다. const readline = require("readline"); const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); const input = []; rl.on("line", (line) => { if (line !== "END") { input.push(line); } else { main(); rl.close(); } }).on("close", () => { process.exit(); }); const main = () => { for (let i = 0; i < input.length; i++) { console.log(input[i].spl..
const readline = require("readline"); const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); rl.on("line", (line) => { main(line); process.exit(); }); /** * * @param {string} line */ const main = (line) => { let [A, B] = line.split(" ").map(BigInt); if (A > B) { let temp = A; A = B; B = temp; } if (A === B || A + BigInt(1) === B) { console.log(0); return; } let a..
// 백준 10103번 주사위 게임을 풀었습니다. const readline = require("readline"); const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); let count = 0; const input = []; rl.on("line", (line) => { if (!count) { count = Number(line); } else { input.push(line); if (input.length === count) { main(); rl.close(); } } }).on("close", () => { process.exit(); }); const main = () => { let ..
// 백준 2747번 배수 찾기를 풀었습니다. const readline = require("readline"); const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); let n = 0; rl.on("line", (line) => { if (!n) { n = Number(line); } else { if (line === "0") { process.exit(); } main(Number(line)); } }); /** * * @param {number} line */ const main = (line) => { if (line % n == 0) { console.log(`${line} is a mult..
// 백준 2744번 대소문자 바꾸기를 풀었습니다. const readline = require("readline"); const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); rl.on("line", (line) => { main(line); rl.close(); }).on("close", () => process.exit()); /** * * @param {string} line */ const main = (line) => { let answer = ""; for (let i = 0; i < line.length; i++) { if ( "a".charCodeAt(0)
// 백준 2576번 홀수를 풀었습니다. const readline = require("readline"); const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); let count = 7; const input = []; rl.on("line", (line) => { if (!count) { count = Number(line); } else { input.push(line); if (input.length === count) { main(); rl.close(); } } }).on("close", () => { process.exit(); }); const main = () => { const num..
// 백준 2480번 주사위 세 개를 풀었습니다. const readline = require("readline"); const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); let count = 0; rl.on("line", (line) => { if (!count) { count = Number(line); } else { main(line); rl.close(); } }).on("close", () => { process.exit(); }); /** * * @param {string} line */ const main = (line) => { const numbers = line.split(" ")...
// 백준 2480번 주사위 세 개를 풀었습니다. const readline = require("readline"); const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); rl.on("line", (line) => { main(line); rl.close(); }).on("close", () => { process.exit(); }); /** * * @param {string} line */ const main = (line) => { const [A, B, C] = line .split(" ") .map(Number) .sort((a, b) => a - b); if (A === B && B === C..
const readline = require("readline"); const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); rl.on("line", (line) => { if (line === "# 0 0") { rl.close(); } main(line); }).on("close", () => { process.exit(); }); /** * * @param {string} line */ const main = (line) => { const [name, age, weight] = line.split(" "); if (age > 17 || weight >= 80) { console.log(`${name..