mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 08:31:26 +00:00
12 lines
230 B
Kotlin
Vendored
12 lines
230 B
Kotlin
Vendored
// WITH_RUNTIME
|
|
val alist = arrayListOf(1 to 2, 2 to 3, 3 to 4)
|
|
|
|
fun box(): String {
|
|
var result = 0
|
|
for ((i: Int, z: Int) in alist) {
|
|
|
|
result += i + z
|
|
}
|
|
|
|
return if (result == 15) "OK" else "fail: $result"
|
|
} |