• + 1 comment

    A hack would be to read everything as val points = scala.io.Source.stdin.getLines() which is a Iterator[String] and get N as

    val N = points.next()