Here is my code:
object Main extends App {
import scala.util.control.Breaks._
import scala.io.StdIn
import java.io.EOFException
breakable {
while(true){
try{
val num = StdIn.readInt()
if(num==42){
break
}
println(num)
}catch{
case x:EOFException => {"null value"}
}
}
}
}
Working fine in sample. Why I get below error on CodeChef?
RUNTIME ERROR : SIGTSTP