When your program results in a wrong answer, it means that your program ran successfully but resulted in an incorrect answer.
This could be because of one of the following reasons:
- Your program contains a bug
- You are not interpreting the problem correctly
- Your program does not pass the sample input and output cases
Note: A piece of code can be evaluated against multiple input and output cases. Therefore, your code can result in a wrong answer even if it has passed the sample input cases correctly.