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

Time limit exceeded!

The following code is for the SpyNumber challenge..it seems correct but the compiler is showing "time limit exceeded"..help me out.. https://code.sololearn.com/c5yHzdugCGsG/?ref=app

2nd Jul 2018, 11:54 AM
Neil Bhowmik
Neil Bhowmik - avatar
3 Answers
+ 4
line 20, the loop condition should be changed to "a>0" as 0 divided by anything remains 0 causing an infinite loop
2nd Jul 2018, 12:02 PM
hinanawi
hinanawi - avatar
+ 1
it's still showing time limit exceeded..
3rd Jul 2018, 5:20 AM
Neil Bhowmik
Neil Bhowmik - avatar
+ 1
Neil Bhowmik works for me
3rd Jul 2018, 7:56 AM
hinanawi
hinanawi - avatar