Half of the test cases are not passing

I have written the right code as per best of my knowldge. But half of the test cases are not being passed so please look after the code once.

for input
3
1 2 3
3
1 2 3

Your output
0, 2, 4, 6, END
correct Output
2, 4, 6, END

you can add one check in main() before printing array

        if(output[0]){
            cout<<output[0]<<", ";
        }
        for (int i = 1; i < outsize; ++i)
        {
            cout << output[i] << "," << " ";
        }
        cout << "END";

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.