You are viewing a single comment's thread. Return to all comments →
Had the same problem and adapted this from @saltybald below:
val n = io.Source.stdin.getLines.toList.map(.trim).map(.toInt).head
Not sure what is going on here, but it worked!
Works, but it's a bit too much work. For input as trivial as this, val n = readLine().toInt should suffice.
val n = readLine().toInt