Why TLE is arising?

why my code throws error for one test case while i have written the exact same thing as the one given in discussion forum