#include<bits/stdc++.h>
#define int __int128
typedef long long ll;
typedef unsigned long long ull;
inline int read(){char ch=getchar();int x=0,f=1;for(;ch<'0'||ch>'9';ch=getchar())if(ch=='-')f=-1;for(;ch>='0'&&ch<='9';ch=getchar())x=(x<<3)+(x<<1)+(ch^48);return x*f;}
int vis[1000],p[1000],tot;
signed main(){
freopen("in.in","r",stdin);freopen("out.out","w",stdout);
std::ios::sync_with_stdio(false);std::cin.tie(0);std::cout.tie(0);
int n=10;
for(int i=2;i<=n;++i){
if(!vis[i])p[++tot]=i;
for(int j=1;p[j]*i<=n;++j){
int x=p[j]*i;
vis[x]=1;
if(i%p[j]==0)break;
}
}
}
这份代码会在 if(i%p[j]==0)
语句 RE,关了 __int128
就没事,求教教。