Like 3
Easy
Execution time limit is 0.1 seconds
Runtime memory usage limit is 64 megabytes
Let's define a natural number as "triplet-like" if its digits consist solely of those that can be expressed as powers of the number 3. Your task is to determine how many triplet-like numbers exist within the interval [A; B].
Input
The program will read two numbers, A and B, provided in a single line and separated by a space (1 ≤ A ≤ B ≤ 10^39).
Output
The program should output a single integer, representing the count of triplet-like numbers within the specified range.
Examples
Input #1
Answer #1
Submissions 41
Acceptance rate 24%