CT972

Kian and the Occurrence Count

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

In the granite steps of Stonehallow, Kian the customs officer keeps careful count of the parcels. optimize the storeroom layout, every figure matters. 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 <= 26; -100 <= a[i],x <= 1000000000.

Example 1:

Input: 25 465852980 951929238 960738269 787490507 400877504 400036488 139627319 222737979 911801234 7681667 799610456 604347474 111613033 439427582 205458857 691106284 24556263 645372720 636117126 587090069 224304490 565688307 919524953 524897194 417332641 59276434
Output: 0

Example 2:

Input: 12 283523578 635951262 387853937 658679046 233784734 571876106 140064740 592550370 3970338 363309430 947328235 320557386 648992213
Output: 0

Example 3:

Input: 18 288612600 990923875 78353420 924571410 425841156 632227350 474674465 603794452 936489642 151284731 637197305 153187549 120307428 677339069 533606571 296313661 631819192 584168409 175803475
Output: 0

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
Kian and the Occurrence Count - EASY Coding Problem | CodeTikki