Needed help in this problem Problem Code : SHIT

This solution is not even passing pretests still it’s getting AC. If there is anything I’m missing in this question SHIT Problem - CodeChef or there were problem is testing process.

Solution link CodeChef: Practical coding for everyone