Is there a way to code something like this in kotlin for a variable number of ints? For example the input should be "1 3 5" or "3 2 2 7" (String with space-separated Ints). And I am not allowed to use java librarys.
val (x, y) = readLine()!!.split(' ').map(String::toInt) println(x+y) Thanks in advance.