Tle problem in 2 test cases

why 2 cases are giving me TLE?

can anybody help me with this?


added comments