일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- javascript
- 문자열
- socket
- dp
- typescript
- 타입스크립트
- Algorithm
- 가천대
- 그래프
- 타입 챌린지
- 수학
- Crawling
- 쉬운 문제
- 알고리즘
- BFS
- 백준
- HTTP 완벽 가이드
- 레벨 1
- 프로그래머스 레벨 2
- Nestjs
- Node.js
- 소켓
- ip
- HTTP
- 자바스크립트
- TCP
- 크롤링
- 프로그래머스
- type challenge
- dfs
- Today
- Total
목록프로그래밍 (478)
kakasoo
// 백준 1978번 소수찾기를 풀었습니다. 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(" ").map(Numb..
// 백준 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..
// 백준 2566번 최댓값을 풀었습니다. const readline = require("readline"); const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); let count = 9; 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 nu..
// 백준 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..
쉬는 시간이 주어져서 한 문제를 더 풀어보았다. // 백준 2460번 지능형 기차를 풀었습니다. const readline = require("readline"); const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); const input = []; rl.on("line", (line) => { input.push(line); if (input.length === 10) { main(); rl.close(); } }).on("close", () => { process.exit(); }); const main = () => { const train = input.map((el) => el.split(" ..
// 백준 2145번 숫자놀이를 풀었습니다. const readline = require("readline"); const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); rl.on("line", (line) => { if (line === "0") { rl.close(); } main(line); }).on("close", () => { process.exit(); }); /** * * @param {string} line */ const main = (line) => { let numbers = line.split(""); const sumOfString = (acc, cur) => { acc = Num..
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..
// 백준 1357번 뒤집힌 덧셈을 풀었습니다. 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) => { console.log(parseInt(line, 16)); }; 뭐 이렇게 쉬운 문제를 푸나 싶다만은, 이유가 있다. 첫째로는 진법 변환과 관련된 문제들을 풀어보려고 했었고, 두번..
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()); const reverseString = (el) => { let newString = ""; for (let i = el.length - 1; i >= 0; i--) { newString += el[i]; } return newString; }; /** * * @param {string} line */ const main = (..
두 개의 코드를 제공한다. 그 외에도 틀린 경우가 많았지만, 가장 대표적인 틀린(?) 코드와, 정답을 작성한다. 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) => { // 1. 2진수를 10진수로 변환한다. let ten = BigInt(0); for (let i = 0;..