You are given a positive integer num.
You must count how many numbers from 1 to num (inclusive) have a digit sum that is even.
The digit sum of a number is found by adding all the digits in it.
Return how many numbers satisfy this condition.
Input: num = 1
Output: 0
Explanation:
Only number is 1 → digit sum is 1 → not even.
Input: num = 10
Output: 4
Explanation:
Numbers with even digit sum → 2, 4, 6, 8, 10
Accepted:
Submission: