Code not submitting

Sir
I was able to solve this problem as i tested random inputs and it was giving correct output but the code wasn’t getting submitted and was saying wrong answer.
So, I unlocked the editorial and testcases, and they matched my answer correctly. Also the test cases were giving correct output. But still. it is not getting submitted.
I’m pasting my code here and attaching the editorial solution photo.
Kindly help.
Tushar

#include
using namespace std;
int main() {
int N;
cin>>N;
int n;
int z;

int even=0, odd=0;
for(int i=0; i<N; i++)
{
	cin>>n;
	while(n>0)
	{
		z=n%10;
		if(z%2==0)
		{
			even+=z;
		}
		else
		{
			odd+=z;
		}
		n=n/10;
	}	
    if(even%4==0 || odd%3==0)
{
	cout<<"YES"<<endl;
    even=0;
    odd=0;
}
else
{
	cout<<"NO"<<endl;
    even=0;
    odd=0;
}

}

return 0;

}

hello @tushar725

you need to print “Yes” , “No” but u r printing “YES” ,“NO”

thats why it is not working.

Oh thankyou sir. I was just stuck for an hour here :slight_smile:

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.

hello sir, i submitted this answer after opening the editorial, so won’t it show the green tick on the question ie. completed?

dont know, pls contact cb support team.