CT22168

The Occurrence Count of the Whispering stamps

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Before the gates of the wren hedges of Thimblewick close for winter, Milo must finish the stamps ledger - one figure at a time. Task: Read n integers and a target x; print how many times x occurs. Input format: First line: n and x. Second line: n space-separated integers. Output format: Print the number of occurrences of x. Constraints: 1 <= n <= 745; -100 <= a[i],x <= 1000000000.

Example 1:

Input: 460 55775861 172076872 186091751 649631825 241297404 860689047 735062924 690044356 609059919 566258801 7517886 773000898 803148044 949267183 867000794 817073857 856708748 7653421 440037316 721366040 803156235 773991882 301029108 738557761 426706392 566371704 360528817 673301010 383152785 585002876 789615200 825723202 392713554 835731226 115224240 315170642 872315538 45116730 191072527 548080934 493895755 966460047 88298899 153205321 116329901 233597428 411504491 758629161 503492837 690749399 501930146 818399456 994241806 102416204 778493559 435444077 298796111 454838857 271918243 605279993 317333904 194407941 538148887 888907466 713821062 851811786 881409770 373055259 474416073 98130099 483628375 229872656 14793388 627240410 637994299 548183886 866696600 116994701 614941631 772641909 10906…
Output: 0

Example 2:

Input: 221 206800841 129342594 367428546 367942461 986137158 876770452 453889798 939583751 869052790 616067903 741162731 753807515 597455192 243913041 847749581 763605693 632366622 720870 116343459 896463062 997928916 532690081 836393142 538354877 637158291 669310643 995368548 34629757 144968853 489252838 829376922 482199385 712349484 731675985 427666867 925133707 216329055 645216563 646017620 948382355 509187394 633612861 239826754 33320740 394786178 654821006 529657644 655781791 96766396 351840181 93784382 896369212 198787098 112818988 161364464 987746318 481178431 744669983 492030051 551937816 787028378 786457987 573811192 901032079 447483593 533422930 727227916 128289448 310260536 934279820 400077716 235865330 498675611 760743742 667920229 527313909 136563578 962945104 691710981 263247284 853…
Output: 0

Example 3:

Input: 411 638041968 410010535 409277129 155653010 783056051 186755498 44397202 857145457 861586943 617902098 847650969 785924940 405596495 233747806 593834500 394942145 831783245 376597006 477110103 812521688 156778136 155980434 712418726 617638555 225568777 806707062 50719551 182984565 37043288 39451919 754306064 941762317 225005140 92050503 830019964 208305256 295929164 76812112 916668296 129371913 944663774 315568194 967764174 793650264 691382644 143784181 675076756 318581555 458605021 957081614 137420940 971617588 420385813 514575108 919627323 287420085 475659805 583169140 50763139 208987661 646796298 882488160 316058968 611963357 853464576 781430387 163163537 121590072 173848973 618484231 992880178 60793266 180140643 283320885 399658018 38139380 191347646 493636456 521872618 161503152 96498…
Output: 0

Constraints:

1 <= n <= 745; -100 <= a[i],x <= 1000000000.

Loading...
Test Cases:No test cases
No test cases available.
The Occurrence Count of the Whispering stamps - EASY Coding Problem | CodeTikki