fork(1) download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. long long int n[1000];
  6. int x;
  7.  
  8.  
  9. int main()
  10. {
  11. for (int i=0; i<=999; i++)
  12. {
  13. x++;
  14. cin>>n[i];
  15. if (n[i]==0)
  16. {
  17. break;
  18. }
  19. }
  20. x=x-2;
  21. for (int i=0; i<=x; i++)
  22. {
  23. if (n[i] % 3 == 0 && n[i] % 5 == 0)
  24. {
  25. cout<<"TAK"<<endl;
  26. }
  27. else cout<<"NIE"<<endl;
  28. }
  29. }
Success #stdin #stdout 0s 4492KB
stdin
555555555555555555555555555555555555555555555555555555555555555555555555
555555555555555555555555555555555555555555555555555555555555555555555555
555555555555555555555555555555555555555555555555555555555555555555555555
555555555555555555555555555555555555555555555555555555555555555555555555
555555555555555555555555555555555555555555555555555555555555555555555555
0
stdout
NIE