CSES Problemset/Sorting and Searching
Distinct Numbers
#1621Ask AI
Open a hint-first prompt in a new AI chat. Grok may ask you to confirm before sending.
Open Claude DesktopYou are given a list of integers, and your task is to calculate the number of distinct values in the list.
Input
The first input line has an integer : the number of values.
The second line has integers .
Output
Print one integers: the number of distinct values.
Constraints
Sample Test Cases (1)
Example 1ID: sample-1
Input
5 2 3 2 2 3
Expected Output
2
Tools
1
2
3
4
5
6
7
8
9
10
11
12
Draft saved locally
|1 line, 0 charsTest Bench
Input (stdin)
5 2 3 2 2 3
Expected Output
2