티스토리 뷰
https://www.acmicpc.net/problem/29738
const [[N], ...ranks] = require('fs')
.readFileSync('./dev/stdin')
.toString()
.trim()
.split('\n')
.map((v) => v.split(' ').map(Number));
const answer = [];
ranks.forEach((rank, i) => {
if (rank <= 25) {
answer.push(`Case #${i + 1}: World Finals`);
} else if (rank <= 1000) {
answer.push(`Case #${i + 1}: Round 3`);
} else if (rank <= 4500) {
answer.push(`Case #${i + 1}: Round 2`);
} else {
answer.push(`Case #${i + 1}: Round 1`);
}
});
console.log(answer.join('\n'));
728x90
'자료구조 알고리즘 > 백준' 카테고리의 다른 글
Node.js) 백준 29729번: 가변 배열 (0) | 2023.09.11 |
---|---|
Node.js) 백준 29722번: 브실혜성 (0) | 2023.09.11 |
Node.js) 백준 29736번: 브실이와 친구가 되고 싶어 🤸♀️ (0) | 2023.09.11 |
Node.js) 백준 29767번: 점수를 최대로 (0) | 2023.09.11 |
Node.js) 백준 29766번: DKSH 찾기 (0) | 2023.09.11 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- MOD
- 면접질문
- 다이나밍프로그래밍
- 투포인터 연습
- 은둔청년체험
- 면접비
- create databases;
- 서버개발
- 투포인터
- DB 생성
- MySQL
- 롱베케이션
- 그래프
- 최소공통조상
- 다이나믹프로그래밍
- create db
- 동적프로그래밍
- 로드나인
- node.js
- 개발자면접
- BFS
- 서버점검
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함