Skip to content

Commit bdfc93d

Browse files
committed
[Bronze I] Title: 수 정렬하기 3, Time: 10372 ms, Memory: 32432 KB -BaekjoonHub
1 parent 0cfbaa4 commit bdfc93d

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# [Bronze I] 수 정렬하기 3 - 10989
2+
3+
[문제 링크](https://www.acmicpc.net/problem/10989)
4+
5+
### 성능 요약
6+
7+
메모리: 32432 KB, 시간: 10372 ms
8+
9+
### 분류
10+
11+
정렬
12+
13+
### 제출 일자
14+
15+
2024년 3월 30일 19:48:50
16+
17+
### 문제 설명
18+
19+
<p>N개의 수가 주어졌을 때, 이를 오름차순으로 정렬하는 프로그램을 작성하시오.</p>
20+
21+
### 입력
22+
23+
<p>첫째 줄에 수의 개수 N(1 ≤ N ≤ 10,000,000)이 주어진다. 둘째 줄부터 N개의 줄에는 수가 주어진다. 이 수는 10,000보다 작거나 같은 자연수이다.</p>
24+
25+
### 출력
26+
27+
<p>첫째 줄부터 N개의 줄에 오름차순으로 정렬한 결과를 한 줄에 하나씩 출력한다.</p>
28+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import sys
2+
3+
n = int(sys.stdin.readline())
4+
5+
6+
num_dict = {}
7+
for _ in range(n):
8+
m = int(sys.stdin.readline())
9+
num_dict[m] = num_dict.get(m, 0) + 1
10+
11+
12+
for i in range(1, 10001):
13+
if i in num_dict:
14+
for _ in range(num_dict[i]):
15+
print(i)

0 commit comments

Comments
 (0)