Delhi's Odd Even


code is showing some timelimit error.

@srshubhi398 hey shubhi you’re trying to solve this question in the wrong manner this is not a write logic
For ex if you are given a no.:

982452

then maintain 2 variables evesum=0, oddsum = 0 ;
and they will be:

9 + 8 + 2 + 4 + 5 + 2
evesum = 8 + 2 + 4 + 2 = 16
oddsum = 9 + 5 = 14
if((evesum%4==0)||(oddsum%3==0)){
cout<<“Yes”<<endl;
}else{
cout<<“No”<<endl;
}

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.