CT25275

Herald's Ledger of readings

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

The dispatch writer Herald has been asked to settle the inheritance fairly. On the desk lies a long table of readings readings. 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 <= 419; -100 <= a[i],x <= 1000000.

Example 1:

Input: 132 790078 302665 279717 812655 840610 841192 27012 598975 837154 217185 34910 75851 751744 561044 4846 139722 573563 767516 162122 265079 541097 210282 181965 587916 999428 448318 823649 515926 951974 396517 509903 340727 328333 1288 845406 41693 740101 766497 781887 537518 571463 487526 169330 957430 627176 618978 882672 899996 569937 844057 895711 834844 751394 987325 840443 386449 339533 362164 413276 615359 92925 615638 777541 899572 184823 528533 681503 153959 921118 168832 305741 376650 541481 572899 885153 385349 827528 394190 29605 617582 314164 665591 762683 924754 467966 447131 280602 749403 608690 263453 782753 890229 827824 277318 178279 901568 466434 482115 388015 406953 977991 796871 296998 505593 357974 618290 112846 324183 458508 427190 382492 725021 164830 819413 366750 630302 287642 141173 941072 389606 98718 467752 439517 902196 995858 291883 376830 819025 65342 320807 426938 607713 723017
Output: 0

Example 2:

Input: 243 8536 504244 957474 579961 914102 988416 970585 287950 648474 542781 185229 880125 620381 684454 874216 225722 676380 458875 234854 870182 126196 584836 10298 402495 599929 562835 219831 821919 580593 165906 993235 115872 577485 598748 896679 668324 633370 406723 154047 503168 780826 721299 631966 939702 647361 362949 339555 895785 265007 981710 766313 443094 236466 768459 561736 211651 726394 435787 685762 896376 417447 361957 687156 586387 948267 798859 203413 567147 932247 471029 661896 718502 368975 848207 980536 944768 597790 142339 944287 210901 975741 648270 222672 789424 388676 678212 976636 818037 466263 698359 488285 396506 594928 339719 744930 940522 734477 625853 637492 746510 738349 637435 362844 296690 159385 950471 961206 468331 901268 636870 379724 666706 166356 67133 236867 717476 931409 248211 78664 203629 557483 160369 914786 270120 352385 507804 178369 802321 316453 581990 204592 317573 440486 576861 33792 971279 454991 440596 897743 718075 898782 503931 995863 140447 265624 372629 442301 289914 730491 118194 359133 915459 706676 147044 951083 867386 684621 30254 139487 440684 871901 975464 175892 147017 937904 753767 79079 278643 886332 848422 914117 746079 382913 534243 225257 977100 337017 933153 650541 805590 149368 777920 210509 221477 869246 246127 174737 913161 514141 106632 877740 906876 15529 847049 148064 692796 272956 725070 308824 741633 264948 87343 157993 442960 459579 344657 208421 294876 299072 710917 876670 920695 339511 830865 576619 414798 808700 881527 127727 415141 146089 343375 239895 326597 49329 135514 535040 433187 525762 645826 276682 238133 392442 165720 871401 982821 394263 107191 473536 27683 122361 108608 863213 447563
Output: 0

Example 3:

Input: 28 675255 527325 319597 27230 623659 271140 608111 819033 163673 2605 182494 868539 136238 319595 710371 212081 860432 420520 580450 689187 6156 892305 864942 35197 287488 481392 909324 957104 132071
Output: 0

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
Herald's Ledger of readings - EASY Coding Problem | CodeTikki