fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. bool wybor(int n){
  5. if(n<=2) return false;
  6. for(int i=2;i*i<=n;i++)
  7. {
  8. if(n%i==0) return false;
  9. else return true;
  10. }
  11.  
  12. }
  13.  
  14.  
  15. int main(){
  16. int n,p,x=1;
  17. cin>>p;
  18. do{
  19.  
  20. cin>>n;
  21. if(wybor(n)==1) cout<<"TAK "<<endl;
  22. else cout<<"NIE "<<endl;
  23. x++;
  24. }
  25. while(x<=p);
  26.  
  27.  
  28. }
  29.  
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
NIE