fork(2) download
  1. #include <iostream>
  2. using namespace std;
  3. int l[100005];
  4. int ip;
  5. int main()
  6. {
  7. cin >> ip;
  8. for (int i=0; i<ip; i++)
  9. {
  10. cin >> l[i];
  11. }
  12. for(int i=0; i<ip; i++)
  13. {
  14. if (l[i]==2 || l[i]==3 || l[i]==5)
  15. cout << "TAK"<<endl;
  16. else if ((l[i]%2)==0)
  17. cout << "NIE"<<endl;
  18. else if ((l[i]%3)==0)
  19. cout << "NIE"<<endl;
  20. else if ((l[i]%5)==0)
  21. cout << "NIE"<<endl;
  22. else cout << "TAK"<<endl;
  23. }
  24. }
  25.  
Success #stdin #stdout 0s 15616KB
stdin
Standard input is empty
stdout
Standard output is empty