According to the Description of the problem, we need to print “Yes”, if the sum of digits which are even is divisible by 4 or sum of digits which are odd in that number is divisible by 3.
If we take the input as 1, then Sum of odd digits is 1 and there cannot be sum of even digits as there are no even digits.
As 1 is not divisible by 3, It should print “No”. But the solution is not getting accepted for this.
Code link : https://ide.codingblocks.com/s/417166
If we consider the sum of even digits as 0 for the same input, then answer will be “Yes” as 0 is divisible by 4 and this solution is being accepted.
Code link: https://ide.codingblocks.com/s/417163
In this case the answer will always be “Yes” if there are no Odd digits or if there are no Even digits.
Ex: 11111111, 22222
I think that we shouldn’t consider the sum of even numbers if there are no even numbers in the Car number and similarly for odd numbers.
Please clarify.
Also, If we unlock the test cases after we scored max marks for the question, will those marks not considered?
My understanding is that we can’t score more marks than what we already scored. But it is mentioned that I will not get any marks if I opened the test cases.
Please clarify.