+ 2

Time limit exceeded.

Whenever I try to compile my codes online a message appears saying "Time limit exceeded." However, if I run the same code on my laptop, it works just fine. Is it because of slow connection or what? Please help.

30th Jan 2018, 11:50 AM
Prabhat kiran
Prabhat kiran - avatar
2 Answers
+ 6
There is a short server window of time SoloLearn allows you execute before stopping your program with time limit exceeded. The elapsed time is around 4 to 5 seconds on the server, but you are still sharing the processor during that time. Nobody has figured out a way to measure the actual time allowed and it appears to vary based on server load based on different outputs being received.
30th Jan 2018, 12:56 PM
John Wells
John Wells - avatar
+ 1
@Immortal, thank you! I had been using getch() at the end as a habit and i did not know that it was not a standard function.
30th Jan 2018, 2:15 PM
Prabhat kiran
Prabhat kiran - avatar