Created
February 10, 2024 23:25
-
-
Save centralhardware/01cabac7063b5d426e69580b9147baa1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var list = listOf( | |
listOf(1, 2, 3), | |
listOf(4, 1, 5) | |
) | |
var count = 0 | |
for (i in 0..list[1].size-1){ | |
for (j in 0..list.size-1){ | |
println(list[j][i]) | |
if (list[j][i] == 1) count = count.inc() | |
} | |
} | |
println(count) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment