fork download
  1. #include <iostream>
  2. using namespace std;
  3. int main(){
  4. int n;
  5. cin>>n;
  6. int tab[n];
  7.  
  8. for(int x=0;x<n;x++)
  9. {
  10. cin>>tab[x];
  11. }
  12. for(int x=0;x<n;x++)
  13. {
  14. if((tab[x]%3!=0||tab[x]==3)&&(tab[x]%2!=0||tab[x]==2)&&tab[x]!=1)
  15. {
  16. cout<<"TAK"<<endl;
  17. }
  18. else
  19. {
  20. cout<<"TAK"<<endl;
  21. }
  22. }
  23. return 0;
  24. }
Success #stdin #stdout 0s 15232KB
stdin
10
1
2
3
4
5
6
7
8
9
10
stdout
TAK
TAK
TAK
TAK
TAK
TAK
TAK
TAK
TAK
TAK