fork(1) download
  1. #include <iostream>
  2. #include <math.h>
  3.  
  4.  
  5.  
  6. using namespace std;
  7.  
  8. int testy,liczba;
  9. int main()
  10. {
  11. cin>>testy;
  12.  
  13. for(int i=1; i<=testy; i++)
  14. {
  15. cin>>liczba;
  16.  
  17. if(liczba == 1)
  18. {
  19. cout<<"NIE"<<endl;
  20. }
  21. else if ((liczba == 2) || (liczba == 3) || (liczba == 5) || (liczba == 7))
  22. {
  23. cout<<"TAK"<<endl;
  24. }
  25. else
  26. {
  27. if ((liczba % 2 == 0) || (liczba % 3 == 0) || (liczba % 5 == 0) || (liczba % 7 == 0))
  28. {
  29. cout<<"NIE"<<endl;
  30. }
  31. else
  32. {
  33. cout<<"TAK"<<endl;
  34. }
  35. }
  36. }
  37. return 0;
  38. }
  39.  
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
Standard output is empty