帮帮我~~
查看原帖
帮帮我~~
1273322
zhuangzhehan1楼主2024/7/6 15:51

}```cpp

 #include<iostream>
using namespace std;
int main(){
	int a,b,c;
	cin>>a;
	bool temp=true;
	for(int i;i<=a;i++){
		cin>>c;
	}
	for(int i;i<=c-1;i++){
		if(c%i==0){
			temp=false;
			break;
		}
	}
	if(c%i!=0&&i!=1){
		cout<<c;
	}
	return 0;
}
2024/7/6 15:51
加载中...