187. Count Distinct Values
EasyHash Set
Print the number of distinct values in the array.
Input format
Line 1: n Line 2: n integers
Output format
The count.
Example 1
Input
5 1 2 2 3 3
Output
3
Example 2
Input
1 7
Output
1
Constraints
1 ≤ n ≤ 10⁵
Read input from standard input and print the answer to standard output. Your code is judged against 6 test cases, most of them hidden.
Loading the MyLoginn IDE…