문제
10818 최소, 최대
답
kotlin code
import java.util.*
import kotlin.collections.ArrayList
fun main(args: Array<String>) {
q10818();
}
fun q10818() = with(Scanner(System.`in`)) {
val list = ArrayList<Int>()
for(i in 0 until nextInt())
list.add(nextInt())
println(list.minOf { it }.toString() + " " + list.maxOf { it }.toString())
}