Maybe you can try using a bare-bones code to find out the time? For example, I’ve just tried the following code, experimented with different durations, and found that 71 ms (after reading all inputs instead of just the first line of input) won’t give me a timeout:
(Note: The code is a bit different from that applicable to your league because the set of inputs is different in Gold League, but the idea should be the same.)
import math._
import scala.util._
import scala.io.StdIn._
object Player extends App {
val laps = readLine.toInt
val checkpointCount = readLine.toInt
for(i <- 0 until checkpointCount) {
val Array(checkpointX, checkpointY) = (readLine split " ").filter(_ != "").map (_.toInt)
}
while(true) {
for(i <- 0 until 2) {
val Array(x, y, vx, vy, angle, nextCheckPointId) = (readLine split " ").filter(_ != "").map (_.toInt)
}
for(i <- 0 until 2) {
val Array(x2, y2, vx2, vy2, angle2, nextCheckPointId2) = (readLine split " ").filter(_ != "").map (_.toInt)
}
Thread.sleep(71)
println("8000 4500 100")
println("8000 4500 100")
}
}