Given L , R ( 1<=L,R <= 1000000000000000000) . Count the numbers in [L,R] such that each number satisfies two properties :
1. The total count of odd digits are even
2. The total count of even digits are odd
Note – Do not consider zero in MSB position
Testcase
Input
1 9
Output
4
Explanation
The numbers that satisfy both the properties are 2,4,6,8 . In each of these numbers , the count of odd digits are even (i.e 0 ) and count of even digits are odd (i.e 1 ).
a,b=map(int(input().split))
print((b-a)//2)
Can i get some more test cases?
https://www.geeksforgeeks.org/count-of-integers-in-a-range-which-have-even-number-of-odd-digits-and-odd-number-of-even-digits/
https://www.geeksforgeeks.org/count-numbers-in-given-range-such-that-sum-of-even-digits-is-greater-than-sum-of-odd-digits/