mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
44 lines
743 B
C++
44 lines
743 B
C++
|
#include <iostream>
|
||
|
#include <string>
|
||
|
#include <vector>
|
||
|
#include <queue>
|
||
|
#include <algorithm>
|
||
|
|
||
|
#include <cstdio>
|
||
|
#include <cstdlib>
|
||
|
#include <cstring>
|
||
|
|
||
|
/// This Contest and Compile does not support C++11.
|
||
|
//#include <thread>
|
||
|
//#include <mutex>
|
||
|
//#include <condition_variable>
|
||
|
//#include <functional>
|
||
|
|
||
|
using namespace std;
|
||
|
|
||
|
bool ck[1000100];
|
||
|
char buff[16];
|
||
|
|
||
|
int main()
|
||
|
{
|
||
|
for(int i=0;i<1000001;i++)
|
||
|
{
|
||
|
sprintf(buff,"%d",i);
|
||
|
ck[i]=(strstr(buff,"4")!=NULL||strstr(buff,"62")!=NULL);
|
||
|
}
|
||
|
|
||
|
int n,m;
|
||
|
while(1)
|
||
|
{
|
||
|
scanf("%d %d",&n,&m);
|
||
|
if(!n&&!m) break;
|
||
|
int cc=0;
|
||
|
for(int i=n;i<=m;i++)
|
||
|
{
|
||
|
cc+=(int)!ck[i];
|
||
|
}
|
||
|
printf("%d\n",cc);
|
||
|
}
|
||
|
return 0;
|
||
|
}
|