I have the following submission in scala for one of the practise questions at INTEST Problem - CodeChef and I keep getting compilation error. I compared it with other submissions and I just have a few lines of difference. But I still get a weird error. Please help.
object Main {
def main(args: Array[String]) {
val inputs = readLine.split(" ")
val n = inputs(0).toInt
val mod = inputs(1).toInt
var sum = 0
for (i <- (1 to n)) {
var myvar = readInt
if (myvar % mod == 0) sum += 1
}
println(sum)
}
}
Here is the compilation error.
http://www.codechef.com/view/error/2506294/