일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Nestjs
- HTTP
- 소켓
- Node.js
- 프로그래머스
- ip
- 가천대
- dp
- 그래프
- javascript
- type challenge
- Crawling
- Algorithm
- BFS
- 알고리즘
- 수학
- 크롤링
- 문자열
- HTTP 완벽 가이드
- dfs
- 프로그래머스 레벨 2
- typescript
- 타입스크립트
- 자바스크립트
- socket
- 쉬운 문제
- TCP
- 타입 챌린지
- 백준
- 레벨 1
- Today
- Total
목록노드 (2)
kakasoo

const readline = require("readline"); const input = []; let count = 0; const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); rl.on("line", (line) => { if (!count) { count = 3 * line; } else { input.push(line); if (input.length % 3 === 0) { main(); } if (input.length === count) { rl.close(); } } }).on("close", () => { process.exit(); }); const main = () => { cons..

node.js로 푼 사람이 별로 없다는 게 참 슬픈 일이다. 자바스크립트로도 문제를 풀 수 있는데... 이 문제에서 주의할 것은 다음과 같다. ( 이 문제를 굳이 node.js로 검색했다면야... ) BigInt를 사용할 것. Cpp에서만 문제가 될 줄 알고 자만했는데, BigInt 때문에 틀린 것이었다. mod를 잊지 말 것. 나누라고 문제에 분명히 나와 있다. 혹시나 map 함수나 fill 등의 Array의 프로토타입 함수로 배열을 반환했다면, 모든 인덱스의 배열이 같은 배열을 가리키게 된다. 이 부분은 자바스크립트의 특성이므로 기억해두자. const readline = require("readline"); const rl = readline.createInterface({ input: process..