1 solutions
-
0
#include<bits/stdc++.h> using namespace std; long long t,n,c; int check(int n){ int c=0; for(int i=2;i*i<=n;i++){ if(n%i==0){ c++; while(n%i==0){ n/=i; } } } if(n>1){ c++; } return c==2; } int main(){ cin>>t; while(t--){ cin>>n; cout<<check(n)<<endl; } return 0; }
Information
- ID
- 14657
- Time
- 1000ms
- Memory
- 500MiB
- Difficulty
- 3
- Tags
- # Submissions
- 11
- Accepted
- 6
- Uploaded By