Time limit
2s
Memory limit
128 MB
Call a positive integer good if every digit is either 4 or 7.
Given two positive integers A and B, count how many good integers are between A and B, inclusive.
The first line contains two positive integers A and B, separated by a space.
1 <= A <= B <= 1,000,000,000
Print the number of good integers between A and B, inclusive.