Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def isPrime(N):
- # return 1 if prime else 0
- i = 2
- if N == 1: return 0
- if N == 2 or N == 3: return 1
- while i*i <= N:
- if N%i == 0:
- return 0
- i += 1
- return 1
- input()
- l = list(map(int, input().split()))
- print(sum([isPrime(N) for N in l]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement