1030 : Count Different Numbers O
Time Limit: 1 Sec Memory Limit: 128 MB Submitted: 243 Solved: 90Description
Given a series of n
numbers, find the total number of different numbers.
For example: the numbers are {2, 2, 1, 3, 4, 4, 5}
, and different numbers are {2, 1, 3, 4, 5}
. The answer is 5
.
Input
There are no more than 100
test cases. Each case contains two lines.
The first line is integer number 1 <= n <= 100
.
The second line are the n
integer numbers which are in range [1, 10^4]
.
Output
The total number of different numbers.
Sample
7 2 2 1 3 4 4 5
5
Hint
Source
深圳技术大学第一届程序设计竞赛(SZTUCPC2021)Author
CSGrandeur