+ 5

C++ codes don't work!

Why C++ Codes I enter doesn't work properly? My codes are okay but I don't know why Sololearn app can't compile them and I get the error message "time limit exceeded" What is the problem?

4th May 2017, 12:27 PM
keivan Ipchi
keivan Ipchi - avatar
7 Antworten
+ 4
Now i get it. The problem is your code is not compatible for gcc. Here is its modified form https://code.sololearn.com/c17317FANhrg/?ref=app
5th May 2017, 5:46 AM
Rishabh Agrawal
Rishabh Agrawal - avatar
+ 14
It is hapenning if your program runs more than X seconds(Not sure about number) So you might try to optimize your code or use inputs that will be computed faster.
4th May 2017, 12:40 PM
WittyBit
WittyBit - avatar
+ 13
It would be great if you can link is to the code to find out if there's a missing statement in the loop or the iterations simply take too long for C.Playground to respond.
4th May 2017, 1:08 PM
Hatsy Rei
Hatsy Rei - avatar
+ 6
There may be an infinite loop in your code as it happened to me also and after I corrected the infinite loop it worked properly.
4th May 2017, 1:02 PM
Rishabh Agrawal
Rishabh Agrawal - avatar
+ 6
Thanks alot
5th May 2017, 7:16 AM
keivan Ipchi
keivan Ipchi - avatar
+ 5
Here is the Code: https://code.sololearn.com/cDw07BF034GG/?ref=app It works fine on Dev but not here!
4th May 2017, 2:54 PM
keivan Ipchi
keivan Ipchi - avatar
+ 5
happy coding buddy...
5th May 2017, 7:46 AM
Rishabh Agrawal
Rishabh Agrawal - avatar