티스토리 뷰
https://www.acmicpc.net/problem/10093
10093번: 숫자
두 양의 정수가 주어졌을 때, 두 수 사이에 있는 정수를 모두 출력하는 프로그램을 작성하시오.
www.acmicpc.net
const fs = require('fs');
const input = fs.readFileSync('./dev/stdin').toString().trim().split('\n');
const [N, M] = input[0]
.split(' ')
.map(Number)
.sort((a, b) => a - b);
const answer = [];
let cnt = 0;
for (let i = N + 1; i < M; i++) {
cnt += 1;
answer.push(i);
}
console.log(cnt);
console.log(answer.join(' '));
728x90
'자료구조 알고리즘 > 백준' 카테고리의 다른 글
Node.js) 백준 10807번: 개수 세기 (0) | 2023.06.16 |
---|---|
Node.js) 백준 2587번: 대표값2 (0) | 2023.06.16 |
Node.js) 백준 1267번: 핸드폰 요금 (0) | 2023.06.16 |
Node.js) 백준 2576번 : 홀수 (0) | 2023.06.16 |
Node.js) 백준 10804번: 카드 역배치 (0) | 2023.06.15 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- MySQL
- 면접질문
- 투포인터
- create databases;
- MOD
- 은둔청년체험
- node.js
- 면접비
- 그래프
- 롱베케이션
- BFS
- 서버점검
- 로드나인
- 서버개발
- create db
- 최소공통조상
- 다이나믹프로그래밍
- 투포인터 연습
- 다이나밍프로그래밍
- DB 생성
- 개발자면접
- 동적프로그래밍
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함