Code is failing all test cases

though the output is completely correct but still the code failes all testcases. Please help

sorry it was my fault got my error…