I have the following code for reading 2 integers:
Array(N, Q) = readLine.split(" ").map(_.toInt)
For this, I am getting the following error:
error: value update is not a member of object Array
If I do
val Array(N, Q) = readLine.split(" ").map(_.toInt)
I get:
error: not found: value N
If I declare them before:
val N, Q
I get:
!error: '=' expected but ';' found.
So how can I read these integers at the same time?