Problem Statement | |||||||||||||
The digits 4 and 7 are lucky digits, and all other digits are unlucky. A first level lucky number is a positive integer whose decimal representation is a palindrome that contains only lucky digits. A palindrome is a number that reads the same forward and backward. John and Brus would like to count the number of first level lucky numbers within a specified range. You are given longs a and b. Return the number of first level lucky numbers between a and b, inclusive. | |||||||||||||
Definition | |||||||||||||
| |||||||||||||
Constraints | |||||||||||||
| - | a will be between 1 and 10^18, inclusive. | ||||||||||||
| - | b will be between a and 10^18, inclusive. | ||||||||||||
Examples | |||||||||||||
| 0) | |||||||||||||
| |||||||||||||
| 1) | |||||||||||||
| |||||||||||||
| 2) | |||||||||||||
| |||||||||||||
| 3) | |||||||||||||
| |||||||||||||