CT947

Wade and the Beryl tickets

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Before the gates of the floating docks of Skyharbor close for winter, Wade must finish the tickets ledger - one figure at a time. 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 <= 94; 0 <= a[i] <= 1000; answers fit a signed 64-bit integer.

Example 1:

Input: 30 419 820 620 124 598 287 402 261 279 422 94 488 112 214 926 133 812 739 603 524 558 240 264 765 255 483 997 289 248 593
Output: 30

Example 2:

Input: 6 268 440 791 917 590 886
Output: 6

Example 3:

Input: 24 473 869 348 110 301 393 930 219 795 718 186 911 956 161 640 192 313 444 552 648 659 123 220 864
Output: 24

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
Wade and the Beryl tickets - EASY Coding Problem | CodeTikki