Skip to content

Commit

Permalink
[Bronze II] Title: 수 정렬하기, Time: 40 ms, Memory: 31120 KB -BaekjoonHub
Browse files Browse the repository at this point in the history
  • Loading branch information
ddubbu-dev committed Aug 9, 2024
1 parent a0c07bf commit ea756a3
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
28 changes: 28 additions & 0 deletions 백준/Bronze/2750. 수 정렬하기/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# [Bronze II] 수 정렬하기 - 2750

[문제 링크](https://www.acmicpc.net/problem/2750)

### 성능 요약

메모리: 31120 KB, 시간: 40 ms

### 분류

정렬, 구현

### 제출 일자

2024년 5월 26일 10:12:12

### 문제 설명

<p>N개의 수가 주어졌을 때, 이를 오름차순으로 정렬하는 프로그램을 작성하시오.</p>

### 입력

<p>첫째 줄에 수의 개수 N(1 ≤ N ≤ 1,000)이 주어진다. 둘째 줄부터 N개의 줄에는 수가 주어진다. 이 수는 절댓값이 1,000보다 작거나 같은 정수이다. 수는 중복되지 않는다.</p>

### 출력

<p>첫째 줄부터 N개의 줄에 오름차순으로 정렬한 결과를 한 줄에 하나씩 출력한다.</p>

20 changes: 20 additions & 0 deletions 백준/Bronze/2750. 수 정렬하기/수 정렬하기.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"""
Q1. 단순히 library 를 쓸 수 있는가?
Q2. 알고리즘을 공부하므로, 직접 구현해본다면 어떤 알고리즘을?
"""
import sys
def cinput():
return sys.stdin.readline()

N = int(cinput())
arr = []

for i in range(N):
item = int(cinput())
arr.append(item)

arr = sorted(arr)

for item in arr:
print(item)

0 comments on commit ea756a3

Please sign in to comment.