Output is correct still none of test cases are working


here is the link to my code.
None of the test cases are passing whereas one is giving time limit exceeded.

Try to submit your code now…

still time limit exceeded in one of em’

Ok…I will check it again…