Special numbers are positive integers whose decimal representation contains only the special digits 2 and 5. For example, 25, 522, and 2 are the special numbers and 7, 15, and 265 are not.
Assume that f(k) is the smallest special number that is greater than or equal to k. Determine the value of the following expression for a pair (l,r):
Input format
Output format
For each test case, print the required answer.
Constraints
1≤T≤501≤l≤r≤109
In the first sample:
f(3)+f(4)+f(5)+f(6)+f(7)=5+5+5+22+22=59