Under construction

Still being built. Things may change

Counting Primes

Interview

Time limit2sMemory limit128 MB

Summary
Count how many of up to 100 given numbers (each at most 1000) are prime.
Level

Easy2 of 10

Topics
Math, Brute force
Solved
No attempts yet

Problem

Given N natural numbers, count how many of them are prime and print the count.

A prime is a natural number greater than 1 that is divisible only by 1 and itself.

Input

The first line contains N, the number of values. N is at most 100.

The next input contains N natural numbers separated by whitespace. Each value is at most 1,000.

Output

Print the number of prime values among the given numbers.

Examples1

  1. Example 1

    Input
    4
    1 3 5 7
    
    Expected output
    3