​传送门​

不要62_#include

#include <bits/stdc++.h>
using namespace std;
#define ll long long
int dp[1000010];
int num[20];

int main()
{
int sum = 0;
int n,m;
for(int i = 1; i <= 1000000; i++)
{

int k = i;
while(k > 0)
{
if(k%10==4||k%100==62)
{
dp[i]++;
break;
}
k/=10;
}
}
while(scanf("%d%d",&n,&m) &&(n||m))
{
int ans = 0;
for(int i = n; i <= m; i++)
{
if(!dp[i])
ans++;
}
cout<<ans<<endl;
}
}