fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. int n,x;
  6. cin>>n;
  7. for(int i=0; i<n; i++)
  8. {
  9. cin>>x;
  10. int l=0;
  11. for(int j=1; j<=x; j++)
  12. {
  13. if(x%j==0) l++;
  14. if(l>2) j=x;
  15. }
  16.  
  17. if(l>2) cout<<"NIE"<<endl;
  18. else cout<<"TAK"<<endl;
  19. }
  20. return 0;
  21. }
Success #stdin #stdout 0s 3460KB
stdin
3
11
1
4
stdout
TAK
TAK
NIE