complete 11399.kt 16438.kt 25571.kt
This commit is contained in:
14
storage/zeta/kt/completed/11399.kt
Normal file
14
storage/zeta/kt/completed/11399.kt
Normal 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))
|
||||
}
|
||||
Reference in New Issue
Block a user