Why i am getting TLE for my solution even though i m only doing mathematical operations.
It would be a great HELP for me if anyone explain me the right approach to solve this ques and most importantly why my code is getting tle. link to my code: CodeChef: Practical coding for everyone link to the Question: CodeChef: Practical coding for everyone
I am eagerly waiting for the answer…
2 Likes
1 Like
Remove those unnecessary cerr as they take time to print things at required log (which you cant view). Also, endl is slow, use \n instead as @raj_13 said.
thank you guys