반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- javascript
- 가천대
- TCP
- ip
- Nestjs
- 백준
- 타입스크립트
- 문자열
- 소켓
- dp
- Crawling
- 그래프
- 알고리즘
- socket
- type challenge
- dfs
- 크롤링
- 타입 챌린지
- Algorithm
- 쉬운 문제
- 수학
- Node.js
- 프로그래머스
- HTTP 완벽 가이드
- 자바스크립트
- 프로그래머스 레벨 2
- 레벨 1
- typescript
- HTTP
- BFS
Archives
- Today
- Total
kakasoo
[node.js] 세수 정렬 ( 백준 2752번 ) 본문
반응형
// 백준 2752번 세수 정렬을 풀었습니다.
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 numbers = line
.split(" ")
.map(Number)
.sort((a, b) => a - b)
.join(" ");
console.log(numbers);
};
반응형
'프로그래밍 > 알고리즘 풀이' 카테고리의 다른 글
[node.js] 피보나치 수 ( 백준 2747번 ) (0) | 2021.04.08 |
---|---|
[node.js] 분산처리 ( 백준 1009번 ) (0) | 2021.04.08 |
[node.js] 팩토리얼 0의 개수 ( 백준 1676번 ) (0) | 2021.04.07 |
[node.js] 소인수분해 ( 백준 11653번 ) (0) | 2021.04.07 |
[node.js] 골드바흐의 추측 ( 백준 6588번 ) (0) | 2021.04.07 |