407064: GYM102697 035 Distinct Numbers
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
035. Distinct Numberstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output
You have a list of numbers. You want to figure out how many distinct (different) numbers are in the list. For example, the list [1, 2, 3, 4, 4, 5, 5] has 5 distinct numbers.
InputThe first line of input contains a single positive integer $$$n$$$: the number of items in the list. The next line contains $$$n$$$ space-separated integers: the list.
OutputOutput a single positive integer $$$d$$$: the number of distinct numbers in the list.
ExamplesInput5 2 2 3 5 6Output
4Input
4 1 2 3 4Output
4