+ 1

Time Limit Exceeded

I created a simple code for practice using tupelos and lists. The code is only 48 lines long but it keeps telling me "time limit exceeded" when I run the code. Occasionally, when I run the code, it provides the output, but only like one out of ten times. What does this mean and how can I fix it?

26th Jul 2017, 10:48 PM
Alyssa
Alyssa - avatar
9 Answers
+ 10
internet issues. fix: not much you can do, wifi maybe? new telco? use a pc? sorry, but I get this issue sometimes too. 😱
26th Jul 2017, 10:51 PM
jay
jay - avatar
+ 10
It will go away for sure! It is a sololearn/internet thing as the code is run on the server not your phone. code on your pc in an ide and you can run all the codes@
26th Jul 2017, 10:56 PM
jay
jay - avatar
+ 10
@Alyssa Menard well Sololearn won't allow endless, that's why it has the time limit. they want to minimize resources wasted so others can use code playground too.
27th Jul 2017, 2:08 AM
Ahri Fox
Ahri Fox - avatar
+ 3
It makes me wonder what will happen if I actually get as far as creating something that is several hundred lines! Do you know if this occurs just in sololearn or if I download Python on my computer would this problem go away?
26th Jul 2017, 10:54 PM
Alyssa
Alyssa - avatar
+ 3
Server codes have to finish in < ~5 seconds. Web codes are exempt, as is the output from PHP (as long as PHP delivers output in time).
3rd Aug 2017, 11:50 PM
Kirk Schafer
Kirk Schafer - avatar
+ 2
the code had an endless loop at the end. When you insert a break command or define the endless loop, it works all the time. 😊
27th Jul 2017, 12:44 AM
Greg
Greg - avatar
+ 2
@peter it was supposed to be endless, that was intentional ;p
27th Jul 2017, 12:49 AM
Alyssa
Alyssa - avatar
+ 2
It depends on what you are trying to make. The server that your code is executed on may not have the libraries or dependencies needed to execute your code.
27th Jul 2017, 12:51 AM
Corey
Corey - avatar