Ace is bored on a car ride to Waterloo. He loves numbers and he has invented a new number system to prove to Waterloo that he is passionate about math. Ace has classified an Ace number as a number whose hexadecimal representation consists only of , , or . For example, 10
, 202
, and 2766
are Ace numbers because their hex representations are A
, CA
, and ACE
respectively. Ace would like to know how many Ace numbers there are between a closed interval .
Input Specification
First line: .
Second line: .
For of the marks, .
For an additional of the marks, .
Sample Input 1
1
100
Sample Output 1
3
Explanation
The three Ace numbers are 10, 12, and 14.
Comments
I am assuming that it is including a and b, right?
Closed interval, so yeah