the code is getting compiled successfully but i am failing the test case what could be the possible reason
Delhi's even odd
it says time limit error
You logic is going wrong. Do a dry run and check it yourself.
You have to find the sum of all digits which are even and the sum of all digits which are odd separately. If the sum of all even digits is divisible by 4 or sum of all odd digits is divisible by 3, then only print “Yes”. In all other cases print “No”.
well its working correctly on compiling and giving some inputs altough on submitting it show time limit error
timelimit is because of your loop at line 12. You have used a condition veh>=0
So when veh =0…even then your condition for loop is satisfied and will run as an infinite loop.
Also follow the logic as i have said above:
You have to find the sum of all digits which are even and the sum of all digits which are odd separately. If the sum of all even digits is divisible by 4 or sum of all odd digits is divisible by 3, then only print “Yes”. In all other cases print “No”.
what could be the possible reason that the counter is not working in its if conditon .https://ide.codingblocks.com/s/212420
Check now.
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.
https://ide.codingblocks.com/s/212935 the test case is failing altough its working correctly on dry run