[Bronze I] Title: 수 정렬하기 3, Time: 8964 ms, Memory: 33432 KB -BaekjoonHub

This commit is contained in:
SSUM
2025-01-29 16:27:37 +09:00
parent 61fc46563d
commit 1b37b6ea5a
2 changed files with 40 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
# [Bronze I] 수 정렬하기 3 - 10989
[문제 링크](https://www.acmicpc.net/problem/10989)
### 성능 요약
메모리: 33432 KB, 시간: 8964 ms
### 분류
정렬
### 제출 일자
2025년 1월 29일 16:26:06
### 문제 설명
<p>N개의 수가 주어졌을 때, 이를 오름차순으로 정렬하는 프로그램을 작성하시오.</p>
### 입력
<p>첫째 줄에 수의 개수 N(1 ≤ N ≤ 10,000,000)이 주어진다. 둘째 줄부터 N개의 줄에는 수가 주어진다. 이 수는 10,000보다 작거나 같은 자연수이다.</p>
### 출력
<p>첫째 줄부터 N개의 줄에 오름차순으로 정렬한 결과를 한 줄에 하나씩 출력한다.</p>

View File

@@ -0,0 +1,12 @@
import sys
N = int(sys.stdin.readline().rstrip())
arr=[0] * 10001
for i in range(N):
temp=int(sys.stdin.readline().rstrip())
arr[temp]+=1
for i in range(10001):
if(arr[i]!=0):
for j in range(arr[i]):
print(i)