Why I am getting TLE? | Sololearn: Learn to code for FREE!

+1

Why I am getting TLE?

https://code.sololearn.com/c59a14A24A14/?ref=app

7/14/2021 7:23:56 PM

Shubham Aggarwal

8 Answers

New Answer

+2

Kirabo Ibrahim I am not good at that but I will try.

+1

Your program's time complexity is actually high. There is a time limit attached to the execution of your program, if it executes longer than the time limit, then you get Time Limit Exceeded error. Determine the complexity of your algorithm. ie The solution might require O(n) algorithm it sth better rather than O(n**2). Try to reduce loops in your pragram

+1

https://code.sololearn.com/cmmClsE4XR03/?ref=app does this work?

+1

@Oma Falk this may solve TLE but what about the output then? I will try putting it in the question.

+1

Which output

+1

Oma Falk ya sorry that was an error by me in input

0

@Oma Falk Its now giving Eof

0

Not for me eof normally means bad input