complete 11399.kt 16438.kt 25571.kt

This commit is contained in:
2025-07-09 16:23:59 +09:00
parent 5907d7f7c8
commit 1c2acfaebe
3 changed files with 132 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
fun minimumTimeTaken(times: List<Int>): Int {
var total = 0;
return times.sorted().sumOf {
total += it
total
}
}
fun main() = with(System.`in`.bufferedReader()) {
readLine()
val times = this.readLine().split(' ').map { it.toInt() }
println(minimumTimeTaken(times))
}