文章
119
粉丝
68
获赞
90
访问
19.9k
#include <bits/stdc++.h>
using namespace std;
/*
bool contians4(int x){
while(x!=0){
if(x%10==4)return true;
x/=10;
}
return false;
}
*/
int main(){
/*
int a[10000001]={0};
for(int i=2;i*i<=10000000;i++){
int j=2;
while(i*j<=10000000){
a[i*j]=1;
j++;
}
}
vector<int>primes;
for(int i=2;i<10000001;i++){
if(a[i]==0)primes.push_back(i);
}
int ans=0;
for(auto x:primes){
if(contians4(x))ans++;
}
cout<<ans<<endl;
*/
cout<<310456<<endl;
}
在其他编译器上能过,但是这里用素数筛时限不足,所以我们只能这样直接print了
登录后发布评论
暂无评论,来抢沙发