标签:des style blog io color sp for div on
1 #include <stdio.h> 2 #include <string.h> 3 4 int flag[1000001]; 5 6 int main(){ 7 int n; 8 int m; 9 int i; 10 int temp; 11 int amount; 12 13 memset(flag,0,sizeof(int)*1000001); 14 for(i=1;i<=1000000;i++){ 15 temp=i; 16 while(temp){ 17 if(temp%10==4 || temp%100==62){ 18 flag[i]=1; 19 break; 20 } 21 temp/=10; 22 } 23 } 24 25 while(1){ 26 scanf("%d%d",&n,&m); 27 28 if(n==0 && m==0) 29 break; 30 31 amount=0; 32 for(i=n;i<=m;i++){ 33 if(flag[i]==1) 34 amount++; 35 } 36 37 printf("%d\n",m-n+1-amount); 38 } 39 40 return 0; 41 }
标签:des style blog io color sp for div on
原文地址:http://www.cnblogs.com/zqxLonely/p/4092259.html