标签:
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 24788 Accepted Submission(s):
8517
1 100 0 0
80
1 #include<stdio.h> 2 const N = 1000000; 3 int biao[1000000]; 4 int main() 5 { 6 int i; 7 for(i=1;i<N;i++) //打表; 8 { 9 biao[i]=1; 10 } 11 for(i=1;i<N;i++) 12 { 13 int temp=i; 14 while(temp) 15 { 16 if(temp%10==4||temp%100==62) 17 { 18 biao[i]=0; 19 break; 20 } 21 temp/=10; 22 } 23 } 24 int m,n; 25 while(~scanf("%d %d",&m,&n)&&m+n) 26 { 27 int total=0; 28 for(i=m;i<=n;i++) 29 total+=biao[i]; 30 printf("%d\n",total); 31 } 32 return 0; 33 }
标签:
原文地址:http://www.cnblogs.com/fengshun/p/4572806.html