The number of even elements of the sequence. Determine the number of even elements in a sequence of integers that ends with the number 0.
Test Case | Input (Sequence) | Expected Output |
---|---|---|
1 | 1 2 3 0 |
1 |
2 | 4 6 0 |
2 |
3 | 7 3 5 0 |
0 |
Python, Java
The number of even elements of the sequence. Determine the number of even elements in a sequence of integers that ends with the number 0.
Test Case | Input (Sequence) | Expected Output |
---|---|---|
1 | 1 2 3 0 |
1 |
2 | 4 6 0 |
2 |
3 | 7 3 5 0 |
0 |