输入不了
查看原帖
输入不了
990278
NEGATUIVE_SEVEN_DL楼主2024/7/22 14:29
#include<bits/stdc++.h>
using namespace std;
int n;
int main()
{
	cin>>n;
	while(n--)
	{
		int t,book[10005],cnt=0;
		cin>>t;
		for(int i=1;i<=sqrt(t);i++)
		{
			while(t%i==0)
			{
				t/=i;
				book[i]=1;
			}
		}
		for(int i=1;i<=t;i++)
		{
			if(book[i]!=0)
			{
				cnt++;
			}
		}
		if(cnt==2) cout<<1<<endl;
		else cout<<0<<endl;
	}
	return 0;
 }
2024/7/22 14:29
加载中...