Why am i getting a wrong answer?

So my program runs the sample input and multiple test cases . But when I submit , I get wrong answer . Why is that?

There are hidden test cases for which Codechef runs your code. Getting correct answer for sample Input and Sample Output does not mean your code is correct. Try generating more testcases to find where your code gives incorrect output.

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

Hey , So i dont really bother much about the constraints .Could that be an issue?

If this question is not from a ongoing contest, it would be better if you could share the problem and submission link.

that would’ve been an issue most prolly if you were getting TLE, more likely that your logic is wrong if it shows WA

that was … flaggable