How many different? P25401


Statement
 

pdf   zip

thehtml

Write a program that prints how many different numbers there are in a sequence with n integer numbers.

Input

Input contains different test data. Each test data starts with a natural number n≥1 followed by a sequence with n integer numbers.

Output

For each sequence of the input print, in a line, the number of different elements that contains.

Public test cases
  • Input

    5       15 12 41 15 41
    5       99 99 99 99 99
    1       -666
    10      1 1 2 3 4 5 6 7 8 9
    
    

    Output

    3
    1
    1
    9
    
  • Information
    Author
    Jordi Petit
    Language
    English
    Translator
    Carlos Molina
    Original language
    Catalan
    Other languages
    Catalan
    Official solutions
    C++ Python
    User solutions
    C++ Python