#C9424. Count Unique Primes

    ID: 53516 Type: Default 1000ms 256MiB

Count Unique Primes

Count Unique Primes

You are given a collection of test cases. In each test case, you are provided with an integer \(N\) followed by \(N\) integers. Your task is to count the number of unique prime numbers in the given list. A prime number is a number \(n > 1\) that has no divisors other than 1 and itself (i.e. \(n\) is prime if it has exactly two positive divisors). For example, 2, 3, 5, and 7 are primes, while 1, 4, 6, etc. are not.

For each test case, output the count of distinct prime numbers in the array.

inputFormat

The input is read from standard input (stdin) and follows this format:

  • The first line contains an integer \(T\), the number of test cases.
  • For each test case, the first line contains an integer \(N\) representing the number of elements.
  • The next line contains \(N\) space-separated integers.

outputFormat

For each test case, output a single line to standard output (stdout) containing the count of unique prime numbers in the array.

## sample
3
10
2 3 4 5 6 7 8 9 10 11
7
1 2 3 5 5 5 7
4
4 6 8 10
5

4 0

</p>