CT27609

Yusuf's Bright Ledger

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Every season at the kelp forests of Tangledeep, someone must certify the cargo before shipping. This year the task falls to Yusuf, armed only with the ingots register. 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 <= 619; -1000000 <= a[i],x <= 10.

Example 1:

Input: 81 -200514 -302626 -256850 -441469 -311286 -247838 -265806 -441438 -937443 -437026 -211892 -804492 -240863 -21076 -346682 -909262 -340520 -101839 -112413 -220999 -221934 -735648 -45266 -566261 -273400 -244054 -617056 -996827 -955634 -84227 -995708 -557337 -550897 -415343 -659868 -629090 -565267 -432258 -189803 -160207 -16478 -775736 -43099 -507822 -798623 -435718 -94516 -14393 -646362 -678105 -516204 -232710 -930110 -588458 -826907 -218498 -507831 -158855 -328724 -276503 -363301 -259970 -133865 -811941 -825949 -566966 -138060 -332795 -774893 -269802 -646184 -116763 -974932 -671985 -89485 -411730 -748721 -73979 -374095 -22037 -671876 -970523
Output: 0

Example 2:

Input: 578 -542434 -837272 -648724 -879065 -348821 -752319 -45150 -545069 -513315 -567422 -99971 -808406 -918315 -366568 -742023 -688530 -393090 -631796 -372708 -282354 -342325 -297341 -201626 -431777 -379263 -51527 -312528 -992303 -897442 -168830 -32622 -715898 -625804 -536734 -903973 -209117 -984178 -196343 -431675 -531028 -524025 -991964 -537852 -114117 -207379 -414685 -291252 -770900 -260768 -367141 -184529 -741164 -67194 -843687 -850562 -651611 -729795 -408271 -751554 -855069 -72486 -926441 -331161 -753685 -550853 -14161 -587991 -850909 -419899 -675928 -539812 -515003 -799252 -881736 -821627 -302721 -234309 -693283 -528647 -922952 -522603 -139695 -108125 -677021 -748358 -845069 -668020 -915214 -153 -150921 -297310 -719522 -931505 -940746 -448421 -171072 -946533 -55234 -120295 -732117 -211134…
Output: 0

Example 3:

Input: 101 -489306 -250258 -481196 -939813 -994251 -955232 -253036 -687697 -992693 -362422 -280248 -438354 -333531 -690964 -232556 -79471 -94452 -28030 -106077 -679531 -246804 -993036 -582097 -552514 -110389 -940503 -339078 -948419 -125557 -477541 -739321 -228826 -312793 -815511 -53776 -950039 -879128 -82440 -868416 -327559 -965167 -955765 -912889 -587002 -490463 -608284 -603164 -136415 -251449 -400641 -612593 -644198 -17760 -330666 -94344 -267581 -944714 -671611 -953154 -168619 -180991 -507473 -611746 -707768 -558647 -557497 -519760 -130315 -706816 -895600 -572469 -773238 -283341 -272478 -900876 -36669 -209115 -528416 -203034 -789731 -269223 -789616 -380794 -403923 -801813 -915226 -209852 -897243 -982818 -172893 -33085 -444030 -303217 -435878 -680634 -612693 -746629 -366021 -589601 -890857 -7294…
Output: 0

Constraints:

1 <= n <= 619; -1000000 <= a[i],x <= 10.

Loading...
Test Cases:No test cases
No test cases available.
Yusuf's Bright Ledger - EASY Coding Problem | CodeTikki