[非官方题解]AC代码
2026-02-10 11:21:57
发布于:广东
6阅读
0回复
0点赞
看到的点个赞吧,求求了
#include<iostream>
using namespace std;
int main(){
int a,b=0,c=0;
cin>>a;
for(int i=2;i<=a;i++){
for(int j=2;j<i;j++){
if(i%j==0){
c++;
}
}if(c==0){
b++;
if(b%5==0){
cout<<i<<endl;
}else{
cout<<i<<" ";
}
}c=0;
}
return 0;
}
这里空空如也







有帮助,赞一个