Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. def isPrime(N):
  2. # return 1 if prime else 0
  3. i = 2
  4. if N == 1: return 0
  5. if N == 2 or N == 3: return 1
  6. while i*i <= N:
  7. if N%i == 0:
  8. return 0
  9. i += 1
  10. return 1
  11.  
  12. input()
  13. l = list(map(int, input().split()))
  14. print(sum([isPrime(N) for N in l]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement