#K39587. Count Unique User IDs
Count Unique User IDs
Count Unique User IDs
You are given multiple test cases. In each test case, you are provided with an integer \(n\) representing the number of user IDs followed by \(n\) user IDs. Your task is to compute the number of unique user IDs in each test case.
The input begins with an integer \(T\) (the number of test cases). For each test case, the first line contains an integer \(n\) and the following \(n\) lines contain a user ID each. The answer for each test case is the count of distinct user IDs.
Example:
Input: 2 5 alice bob alice charlie bob 3 admin user1 admin</p>Output: 3 2
Remember to use standard input and output in your solution.
inputFormat
The input is read from standard input (stdin) and has the following format:
- An integer \(T\) denoting the number of test cases.
- For each test case:
- An integer \(n\) indicating the number of user IDs.
- \(n\) lines follow, each containing a user ID (a string).
outputFormat
For each test case, output a single line containing one integer — the count of unique user IDs in that test case. The output is printed to standard output (stdout).
## sample2
5
alice
bob
alice
charlie
bob
3
admin
user1
admin
3
2
</p>