Why this code is giving TLE in codechef?


can u please help?

I have tried ur code on codechef and it is giving correct answer.