本地运行可以编译,但上传时编译失败
查看原帖
本地运行可以编译,但上传时编译失败
1445227
hongxiaoyu楼主2025/2/6 18:02
#include <bits/stdc++.h>
using namespace std;
long long a[100000000]={2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101};
int main(){
	long long n,e;
	cin>>n;
	for (int i=1;i<=n;i++) {
		cin>>e;
		int total=0;
		for (int j=0;j<=25;j++) {
			if (e%a[j]==0) {
				total++;
			}
		}
		if (total==2) {
			cout<<1<<endl;
		}else {
			cout<<0<<endl;
		}
	}
	return 0;
}
2025/2/6 18:02
加载中...