#K16206. Powerful Spells Counting
Powerful Spells Counting
Powerful Spells Counting
You are given one or more test cases. In each test case, you are provided with a list of spells. A spell is considered powerful if the number of distinct characters in its string is a prime number. In other words, if a spell has \(d\) distinct characters and \(d\) is prime (i.e., \(d > 1\) and has no divisors other than 1 and \(d\)), then the spell is powerful.
Your task is to count and output the number of powerful spells for each test case.
inputFormat
The input begins with an integer \(T\) representing the number of test cases. Each test case is described as follows:
- The first line contains an integer \(N\), the number of spells.
- The following \(N\) lines each contain a non-empty string representing a spell.
Input is provided via standard input (stdin).
outputFormat
For each test case, output a single integer on a new line representing the number of powerful spells. Output is provided via standard output (stdout).
## sample1
3
abc
abb
abcde
3
</p>