my code is correct but there is wrong answer in test case but i checked my code by custom outputs in ide its working fine
can anyone tell me the mistake in my code
its regarding delhi odd even problem
Doubt in code in Delhi's odd even problem
@taran9873 hey tarandeep you’re implementing this question in wrong manner
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;
}
1 Like
i was confused …thanks for helping
its working now thanks