문제
2562 최댓값
답
kotlin code
import java.util.*
import kotlin.collections.ArrayList
fun main(args: Array<String>) {
q2562();
}
fun q2562() = with(Scanner(System.`in`)) {
val requests = Array<Int>(9) {nextInt()};
val max = requests.maxOf { it };
val maxIndex = requests.indexOf(max);
println(max)
println(maxIndex + 1)
}