Post

[백준/코틀린] 2751번: 수 정렬하기 2

실버 5

링크

2751번: 수 정렬하기 2

풀이

StringBuilder를 사용하여 출력 시간을 단축합니다.

코드

1
2
3
4
5
6
7
fun main() = with(StringBuilder()) {
    List(readln().toInt()) { readln().toInt() }
        .sorted().forEach { appendLine(it) }

    println(toString())
}

This post is licensed under CC BY 4.0 by the author.