What is the wrong in code that gives me TLE?

@rishravi937
There is an error with the test cases
The issue will be fixed soon
Till then please try other questions

check my code for once it’s correct or not

@rishravi937
Your code was incorrect
Cross verify it with this once