+ 19
Time limit exceeded in python
The program compiles successfully and is free from any bugs but while execution i get this error after partially obtaining the results. what is the default time limit? what are possible solutions for this error? can we define separately the time limit required for execution by a particular program?
7 Respuestas
+ 18
@ace
@john Wells
thanks for your post
But is there any way to find out what is the allotted time for execution on server?
Can we manually define the time for execution in code or by any other means before actual execution of code?
+ 16
@kirk Schafer
thanks for the code👍
+ 13
There are 2 cases now.
It depends on the 2 numbers, which are given as input.
If u start from 0, then for a range of 1000 approximately, I get this problem.
Again if I select a higher numbers, for example (10000 to 10500) I get it again
+ 4
I've reported timeout is ~4-5 seconds for a while, but based on codes for another purpose + never explained.
So... here's proof with codes written for measuring TLE.
Timeout (seconds; run until I got 5 samples each):
1: not responding
2: 4.95, 4.95, 4.94, 4.95, 4.95
3: 4.95, 4.93, 4.97, 4.95, 4.9978 (< 5)
4: 4.95, 4.95, 4.97, 4.95, 5.08 (anomalous > 5)
edit: Another @ 5.76. The control script may allow a rare split-second that should not exceed variance 1.
https://code.sololearn.com/cZDI0lib4Dj5/?ref=app
https://code.sololearn.com/cmilKMcdLY1L/?ref=app
+ 3
Also, the length of time varies based on server load or timeframe. People have reported programs working to completion sometimes and only getting part way through on other runs with no changes (me included.)
+ 2
It is not possible to have any interaction with the server.