fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.  
  6. int n;
  7. int a;
  8. cin>>n;
  9.  
  10.  
  11. if (n<100000||n>0)
  12. {
  13.  
  14. for (int i=0;i<n;i++)
  15. {
  16. cin>>a;
  17. if (a<1||a>10000)
  18. {
  19. continue;
  20. }
  21.  
  22. else
  23. {
  24.  
  25.  
  26. if (a==1)
  27. {
  28. cout<<"NIE"<<endl;
  29. continue;
  30. }
  31. if(a==2||a==3||a==5||a==7)
  32. {
  33. cout<<"TAK"<<endl;
  34. continue;
  35. }
  36.  
  37.  
  38.  
  39. if(a%2==0)
  40. {
  41. cout<<"NIE"<<endl;
  42. continue;
  43. }
  44.  
  45. if(a%3==0)
  46. {
  47. cout<<"NIE"<<endl;
  48. continue;
  49. }
  50. if(a%5==0)
  51. {
  52. cout<<"NIE"<<endl;
  53. continue;
  54. }
  55. if(a%7==0)
  56. {
  57. cout<<"NIE"<<endl;
  58. continue;
  59. }
  60. else
  61. cout<<"TAK"<<endl;
  62. }
  63. }
  64. }
  65. return 0;
  66. }
Success #stdin #stdout 4.64s 2728KB
stdin
Standard input is empty
stdout
Standard output is empty