I am getting wrong answer but getting correct results for the test cases

Solution: 49258107 | CodeChef

Can someone please help me find my mistake…