CT1036

The Caramel readings of Lothar

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

The harbor bell rings at the pine barrens of Needlepoint; Lothar weighs the day's readings manifests and starts the calculations. Task: Read n integers and print the number of distinct values. Input format: First line: n. Second line: n space-separated integers. Output format: Print the count of distinct values. Constraints: 1 <= n <= 72; -1000000 <= a[i] <= 1000; answers fit a signed 64-bit integer.

Example 1:

Input: 54 -66715 -701236 -210074 -982232 -850382 -505690 -229031 -532021 -490953 -2643 -329551 -875968 -106542 -2921 -65760 -573450 -155073 -207611 -319084 -655882 -378006 -612928 -796429 -875962 -684402 -502650 -450819 -385329 -422094 -15892 -576084 -831914 -266079 -118466 -974418 -302324 -844578 -871706 -645708 -404 -623811 -986315 -499288 -17414 -345073 -14629 -108836 -797076 -454909 -893432 -379793 -426563 -661862 -668783
Output: 54

Example 2:

Input: 48 -285443 -920782 -386572 -728562 -771365 -147542 -753251 -12821 -800014 -586515 -412 -653829 -205851 -700195 -322375 -247073 -777534 -822055 -819112 -552877 -640589 -5201 -106110 -668500 -906437 -438066 -388583 -961973 -244133 -496307 -902806 -895256 -941764 -321662 -184657 -630595 -339434 -151371 -634446 -759646 -950094 -892514 -371522 -154085 -6501 -889618 -341294 -296440
Output: 48

Example 3:

Input: 16 -176760 -361735 -735212 -948162 -713134 -685720 -423473 -615805 -409550 -765296 -767518 -102212 -683854 -191836 -849997 -300126
Output: 16

Constraints:

1 <= n <= 72; -1000000 <= a[i] <= 1000; answers fit a signed 64-bit integer.

Loading...
Test Cases:No test cases
No test cases available.