Skip to content

Instantly share code, notes, and snippets.

@tommykw
Last active May 4, 2022 04:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tommykw/89dfa36b64f240e00343b277125f4faf to your computer and use it in GitHub Desktop.
Save tommykw/89dfa36b64f240e00343b277125f4faf to your computer and use it in GitHub Desktop.
Vertical number list -> 1,2,3,4,5
fun main() {
var l = readLine()
var output = ""
while (l != "") {
output += "${l},"
l = readLine()
}
println(output.removeSuffix(","))
println(output.removeSuffix(",").split(",").size)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment