fork download
  1. #include <iostream>
  2. using namespace std;
  3. int c=0,w;
  4. int main()
  5.  
  6. {
  7.  
  8. cin>>w;
  9. for(int u=1;u<=w;u++)
  10. {
  11.  
  12.  
  13. int b;
  14. cin>>b;
  15.  
  16. for(int i=1;i<=b;i++)
  17. {
  18. if(b%i!=0)
  19. continue;
  20. else
  21. c++;
  22. }
  23. if(c==2)
  24. cout<<"TAK\n";
  25. else
  26. cout<<"NIE\n";
  27.  
  28. c=0;
  29. }
  30. return 0;
  31. }
Success #stdin #stdout 0.01s 5436KB
stdin
4
56
34
87
99
stdout
NIE
NIE
NIE
NIE