File tree Expand file tree Collapse file tree
goormlevel/191018/1. 구름 아이돌 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # 구름 아이돌 - 191018/1
2+
3+ [ 문제 링크] ( https://level.goorm.io/exam/191018/%EA%B5%AC%EB%A6%84-%EC%95%84%EC%9D%B4%EB%8F%8C/quiz/1 )
4+
5+ ### 성능 요약
6+
7+ 메모리: 41.13 MB, 시간: 0.49 ms
8+
9+ ### 제출 일자
10+
11+ 2026년 05월 12일 16:02:35
12+
Original file line number Diff line number Diff line change 1+ const readline = require('readline');
2+
3+ (async () => {
4+ let rl = readline.createInterface({ input: process.stdin });
5+ const input = [];
6+
7+ for await (const line of rl) {
8+ if (!line.trim()) break;
9+ input.push(line.trim());
10+ }
11+
12+ const N = Number(input[0]);
13+ const scores = input[1].split(' ').map(Number);
14+
15+ const S = scores.map((score,index)=>({
16+ score: score,
17+ id: index+1
18+ }))
19+
20+ S.sort((a,b)=>b.score-a.score);
21+ console.log(S.slice(0,3).map(c=>c.id).join(" "));
22+ process.exit();
23+ })();
You can’t perform that action at this time.
0 commit comments