Count Even Digits
Count how many digits of N are even (0, 2, 4, 6 or 8).
Input: one integer N.
Output: the number of even digits.
Constraints:
- 0 ≤ N ≤ 1018
Sample Tests
Input 1
2739
Output 1
1
Input 2
2048
Output 2
4
Discussion (opens after you solve — no spoilers before)
No comments yet.