fork(1) download
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <cstdio>
  4. #include <math.h>
  5. #include <string>
  6. #include <sstream>
  7. using namespace std;
  8.  
  9. long int c,a,b,wynik,d,liczbaTestow;
  10.  
  11.  
  12. int main()
  13. {
  14.  
  15. cin>>liczbaTestow;
  16. while(liczbaTestow!=0)
  17. {
  18. cin>>b;
  19. d=b%2;
  20. wynik=b%3;
  21. c=b%5;
  22. if ((b==0) || (b== 1)) cout<<"NIE"<<endl;
  23.  
  24.  
  25. else if ((b==3)||(b==5)||(b==2) ) cout<<"TAK"<<endl;
  26. else if(d == 0) cout<<"NIE"<<endl;
  27. else if(wynik==0) cout<<"NIE"<<endl;
  28. else if (c==0) cout<<"NIE"<<endl;
  29. else cout<<"TAK"<<endl;
  30.  
  31.  
  32. liczbaTestow--;
  33. }
  34. return 0;
  35. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
Standard output is empty