Plz check the code

the output of my code is correct if i compile it myself
but it fails every testcase
plz check the mistake