0

How to overcome time limit exceed (error)

During the compilation I got a error "Time limit exceed" https://code.sololearn.com/cudbQIp9ejZ5/?ref=app

24th Jan 2019, 6:13 PM
vijay
vijay - avatar
2 Respuestas
+ 2
Thank you guys... I made some changes in my code according to yours valuable suggestion and got a 100% accurate value https://code.sololearn.com/cudbQIp9ejZ5/?ref=app
24th Jan 2019, 8:07 PM
vijay
vijay - avatar
+ 1
Line 25 accuracy <= fabs... I'm not sure but I think that the loop runs infinity. Remove the =. Edit: I do not understand the math behind your program. Maybe you have to use >=. Or you forgot something to do with accuracy or the fabs () part.
24th Jan 2019, 6:41 PM
Denise Roßberg
Denise Roßberg - avatar