Must-read intro: <https://kotlinlang.org/docs/tuto...
# codeforces
v
Must-read intro: https://kotlinlang.org/docs/tutorials/competitive-programming.html Here is a bunch of helper input reading functions that extend those examples for reading different types, lists and arrays, etc: https://stackoverflow.com/questions/41283393/reading-console-input-in-kotlin Hope that in some future Kotlin release stdlib would comprise something similar in addition to sole readLine().
e
They are hardly needed outside of competitive programming, so there is not much reason to pollute stdlib with them.
v
This consern in understandable. But teaching Kotlin as first language would greatly benefit from them too. I remember a previously discussed idea to offload them into separate but still official opt-in library like kotlinx. That could be easily enabled on all ejudges, etc. Kotlin is so good in revealing from boilerplate in other areas that limited input parsing support seems a bit frustrating. )
👍 1
Even a single additional fast fun readToken(delim: String = " "): String would greatly improve situation. It's predictable that competitive programming would shift to Kotlin Native where slow Scanner is not available at all.