CT20859

Fiora Counts the tickets

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

It is audit day at the archive halls of Scrollkeep. Fiora spreads the tickets records across the table and picks up a sharp pencil. 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 <= 201; -1000000 <= a[i],x <= 1000000.

Example 1:

Input: 168 -877398 99670 172166 805616 -936562 157348 202888 254240 676664 -330205 813853 364183 -691069 499928 144599 -605786 -697535 -43458 -799783 -505419 952250 804988 -416585 292674 190050 20872 895041 202063 -409842 593471 921456 948259 570141 -645216 -926131 182410 938419 -866872 -794457 -556635 -431134 -21778 -96956 678133 -226790 -55293 422948 -795952 -228724 -386295 -352105 57838 666122 -428116 308700 731571 322211 943356 92613 -187554 -580775 -703345 -567672 -737833 -631090 64769 928500 629804 -982436 904921 487560 -548991 567787 418408 -311728 -231348 -832990 -320356 536373 -580080 -464433 -71950 790210 66877 15234 453657 -798211 260081 205428 -523591 777163 375373 -600895 12211 -87823 889125 8748 -126446 149674 193309 771932 -289858 921696 614876 693075 372233 738114 -632754 910551 -876332 946393 -685578 -79801 -498410 -622999 971387 -807925 -849028 219200 33416 681653 -121322 -656763 -522544 289847 290474 -746591 818862 -849105 467953 -570199 -176435 737522 182692 -951824 356839 -703924 468987 -370284 -737663 293047 184296 655635 862461 868510 -30143 399959 359562 -603144 -81742 -901416 -603918 810294 -824980 331788 -34944 663101 218566 -433919 615614 998444 -552988 300200 -858257 -847314 602697 618801 -603513 117582
Output: 0

Example 2:

Input: 57 -662177 863024 354294 156512 -917075 399635 -347741 314076 -6732 859971 514539 357660 -945039 -468216 736095 699955 -143361 205830 773623 -551373 523129 824703 826978 636664 196154 237796 -801277 837475 -849281 214924 457126 445842 368296 811155 -879443 -118446 674488 463669 750351 701775 539530 327674 -21972 -271575 674647 116464 -395282 -470802 233240 863211 21061 483365 197775 -409405 68811 373788 -474428 -546739
Output: 0

Example 3:

Input: 151 23006 -762146 -607478 113148 78650 -502152 -162352 510443 -973404 -718336 376687 430197 718971 37410 990551 -777328 -327640 -66161 -180974 -377402 -768817 -80585 519312 -762870 269841 -437309 757709 18090 349592 -753130 -24449 -218974 -847700 -734017 -217364 674183 368342 804138 -17062 587329 718829 561481 447355 319965 -259636 -135590 509059 639160 -167651 -801941 -136872 598458 350941 432811 -796905 311725 682273 -84471 889730 -402530 766062 -823182 528056 -984703 231565 -329798 948076 -555601 40890 -883647 113502 538417 387763 365397 -680347 873973 551571 798515 -329149 953753 -216471 -151311 -299010 -713587 -190429 189847 882346 963568 862480 -985335 130177 -734875 -361201 530000 378242 -394554 724343 391162 594880 883661 -313643 -101824 690506 -388914 948797 -36964 -522207 236579 -725075 -64451 481219 -81813 -688899 755385 -587563 204782 -730639 -646102 871560 205902 888791 -980017 -729325 395240 -957301 -842705 -81728 568797 806998 -189047 980538 -704843 -428593 -910397 -228050 -246156 -743035 339667 -858057 -223585 539716 -6143 -92078 -162352 39159 116028 -481181 -513296 -347588 236282 213789 -376933
Output: 0

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.