fork download
  1. # your code goes here
  2. prob = int(input())
  3. t = 0
  4. while t < prob:
  5. liczba = int(input())
  6. x = 1
  7. dzielniki = 0
  8.  
  9. while x <= liczba:
  10. if liczba % x == 0:
  11. dzielniki += 1
  12. if dzielniki > 2:
  13. break
  14. x += 1
  15.  
  16. if dzielniki == 2:
  17. print("TAK")
  18. else:
  19. print("NIE")
  20. t += 1
Success #stdin #stdout 0.04s 9576KB
stdin
9
1
2
3
4
5
11
22
61
100
stdout
NIE
TAK
TAK
NIE
TAK
TAK
NIE
TAK
NIE