CT27278

Twilight barrels Distinct Count

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

The harbor bell rings at the willow walks of Reedmarsh; Tara weighs the day's barrels 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 <= 743; -100 <= a[i] <= 1000000000; answers fit a signed 64-bit integer.

Example 1:

Input: 118 321983162 323823543 71845385 752499111 201255870 740613809 711209786 651614235 185775311 608567630 93016527 222684776 53511301 749240508 780521481 252833453 153616673 264329462 226622131 55288410 73350435 577286054 123532419 277780377 760322419 267571456 425589144 693895046 429038404 124378560 558106092 534424842 606558650 14787945 90159314 659809218 119621944 543551521 341176047 778839955 440021812 95968176 963864434 638228273 336330878 518768775 555167037 398840270 595047510 643573116 776602564 2339157 266277168 537199692 135104412 433653577 819380102 527347775 250688754 981166074 996614482 845876134 454362327 70799665 47235271 184871331 186199184 744561716 334780806 156102563 72934473 168217829 564260995 725495171 265742549 194076976 158750061 167481401 984213290 732846729 57123255 …
Output: 118

Example 2:

Input: 117 49746876 438121250 513200272 536010394 969713432 924671050 559188577 307202402 898704771 563010559 223449592 361605471 483387303 647452047 124357380 683898900 140676656 24063054 503376710 993851406 324982860 55764529 581911096 243626810 466402770 273044569 440048424 94258066 661346700 511335776 31199525 174644554 543366027 332728462 835877438 818731788 108054705 116899242 777340949 334856065 888879265 984885064 674482546 958878796 661918692 983745924 903533985 625303015 67924945 86732035 473201609 331462229 986671176 3919313 367122508 447357727 987338062 135310076 202014471 44281496 355018183 66983357 443073140 28248642 40670211 684436821 721837649 186716207 653872847 130611864 197150511 346196866 154644448 580759729 175996136 916483707 442411111 121124309 505321251 597463210 956930022…
Output: 117

Example 3:

Input: 613 455988509 189173754 16791773 371541686 949107006 625084380 999115590 480235704 198926106 495263749 146573778 918886457 121242073 926844847 219091811 288461113 821145942 384544123 939655963 55216834 904341768 692144462 499090 101855114 477457742 975176798 24733420 787249097 26790043 390521460 837074558 112596871 831355066 671425071 367837175 34294741 111122353 549372615 564858835 844467299 54165576 77577786 190632699 322931024 604521735 530775570 855857048 844456023 133253283 550631001 755287763 712151735 849366584 398978965 738237499 568000402 856118722 79623735 38807167 552914994 535616307 880739556 43527188 981360038 221239417 324083455 286894805 602410689 154679565 521882035 176462853 264513551 941301323 675413616 528129628 15384154 86666949 970420229 262966779 27138680 561335776 11…
Output: 613

Constraints:

1 <= n <= 743; -100 <= a[i] <= 1000000000; answers fit a signed 64-bit integer.

Loading...
Test Cases:No test cases
No test cases available.
Twilight barrels Distinct Count - EASY Coding Problem | CodeTikki