Wrong answer despite checking runtime with right constrains

This is my solution

Sorry for sounding like a noob, but can someone help me figure out why my submission was flagged as wrong?
I’ve tried running it on Codechef IDE and other online compilers with all the given constraints listed in the question. The value is printed in the output are correct too.
I want to understand why my solution was marked wrong, so I can correct and avoid it the next time.

Consider the test input:

9 1 2 3 4 5
3 2 1 1

You should input the elements of the array “num” first, before printing “no” when “s” is even.

See this submission: https://www.codechef.com/viewsolution/52060976

1 Like

Yes. Tried it. Understood my mistake. If 2 consecutive even numbers are put in. After the 1st read’s error, the 1’s number’s input is not skipped. Understood. Thanks

1 Like

Got it. Thanks for the help