How can I fix the Time limit exceeded? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How can I fix the Time limit exceeded?

I posted a code writen in Python and when i run it I get the time limit exceeded. How can I fix this problem?

24th Oct 2018, 11:37 AM
FlaviusKID
FlaviusKID - avatar
6 Answers
+ 3
Run it on a laptop instead of SoloLearn. They do it on purpose to prevent your program from using too many resources.
24th Oct 2018, 11:48 AM
John Wells
John Wells - avatar
+ 3
There are somethings that do help. It is worth the try as you can remove and test without saving so you can return to the original when it doesn't help.
24th Oct 2018, 11:58 AM
John Wells
John Wells - avatar
+ 2
You might rewrite to print less or speed up the program's algorithm. But, it could be impossible depending on what you are trying to do.
24th Oct 2018, 11:53 AM
John Wells
John Wells - avatar
+ 1
so there is no way arround?
24th Oct 2018, 11:50 AM
FlaviusKID
FlaviusKID - avatar
+ 1
i understand. one more thing. if i remove de include time in my program it could help?
24th Oct 2018, 11:55 AM
FlaviusKID
FlaviusKID - avatar
+ 1
ok. thank you very much!
24th Oct 2018, 11:59 AM
FlaviusKID
FlaviusKID - avatar