fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int x, ilosc = 0, i = 1, y;
  6. while (cin >> x) {
  7. ilosc = 0, i = 1, y;
  8. do {
  9. y = x % i;
  10. i++;
  11. if (y == 0)
  12. ilosc++;
  13. } while (i != x + 1);
  14. if (ilosc > 2 || x == 2)
  15. cout << "Nie\n";
  16. else
  17. cout << "Tak\n";
  18. if (cin.eof()) break;
  19. }
  20. return 0;
  21. }
Success #stdin #stdout 0s 15232KB
stdin
1
2
3
4
5
6
7
8
9
10
stdout
Tak
Nie
Tak
Nie
Tak
Nie
Tak
Nie
Nie
Nie