Skip to content

Commit 3f5608f

Browse files
committed
[Bronze IV] Title: 세수정렬, Time: 8 ms, Memory: 69108 KB -BaekjoonHub
1 parent edfa9b7 commit 3f5608f

2 files changed

Lines changed: 34 additions & 0 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# [Bronze IV] 세수정렬 - 2752
2+
3+
[문제 링크](https://www.acmicpc.net/problem/2752)
4+
5+
### 성능 요약
6+
7+
메모리: 69108 KB, 시간: 8 ms
8+
9+
### 분류
10+
11+
구현, 정렬
12+
13+
### 제출 일자
14+
15+
2025년 3월 19일 22:51:12
16+
17+
### 문제 설명
18+
19+
<p>동규는 세수를 하다가 정렬이 하고 싶어졌다.</p>
20+
21+
<p>정수 세 개를 생각한 뒤에, 이를 오름차순으로 정렬하고 싶어졌다.</p>
22+
23+
<p>정수 세 개가 주어졌을 때, 가장 작은 수, 그 다음 수, 가장 큰 수를 출력하는 프로그램을 작성하시오.</p>
24+
25+
### 입력
26+
27+
<p>정수 세 개가 주어진다. 이 수는 1보다 크거나 같고, 1,000,000보다 작거나 같다. 이 수는 모두 다르다.</p>
28+
29+
### 출력
30+
31+
<p>제일 작은 수, 그 다음 수, 제일 큰 수를 차례대로 출력한다.</p>
32+
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
let answer = readLine()!.split { $0 == " " }.map { Int(String($0))! }.sorted().map{ String($0) }.joined(separator: " ")
2+
print(answer)

0 commit comments

Comments
 (0)