Guest User

Untitled

a guest
Apr 15th, 2021
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. ammountofnumbers = int(input())
  2. i=0
  3. while ammountofnumbers>=i:
  4. i+=1
  5. liczba=int(input())
  6. d=2
  7. czypierwsza= 3
  8. if liczba==2: czypierwsza = 1
  9. elif liczba==1: czypierwsza = 2
  10. elif liczba==3: czypierwsza = 1
  11. else:
  12. while d<(liczba+1)/2:
  13. if liczba%d!= 0:
  14. d+=1
  15. czypierwsza =1
  16. else:
  17. czypierwsza = 2
  18. break
  19. if czypierwsza==1:
  20. print("TAK")
  21. elif czypierwsza==2:
  22. print("NIE")
  23.  
  24.  
Advertisement
Add Comment
Please, Sign In to add comment