CT27886

Sona's Northern Ledger

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

The council of the zephyr cliffs of Galeholm pays by the answer, and Sona intends to earn it. First: the full register of ingots. 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 <= 626; -100 <= a[i],x <= 1000.

Example 1:

Input: 10 337 22 85 696 948 -85 59 -19 -60 343 38
Output: 0

Example 2:

Input: 596 422 520 387 21 -3 233 820 -25 754 392 290 -6 -51 835 85 236 813 -9 476 -56 -14 901 593 634 464 733 981 904 817 -30 474 -85 59 842 565 843 -33 229 135 -29 854 216 712 802 826 231 893 947 158 649 141 489 309 542 690 630 563 4 297 119 117 183 185 260 982 740 43 161 814 565 239 376 468 887 -94 982 -68 491 510 414 424 885 170 908 880 779 170 659 -52 860 -19 281 556 -9 -81 97 -83 760 888 875 293 801 329 441 45 731 634 363 800 528 894 297 480 721 -7 591 257 698 860 903 490 142 609 69 826 423 494 270 977 968 268 678 149 273 917 452 137 432 986 549 381 751 863 319 71 302 156 832 661 106 654 -13 537 157 902 271 138 363 354 669 874 -20 604 478 801 -58 751 444 900 842 334 952 665 345 -90 373 64 850 -30 574 618 799 399 207 364 399 795 873 868 502 602 974 302 669 809 223 -69 346 -16 906 780 -62 135 …
Output: 0

Example 3:

Input: 255 852 744 507 317 164 452 372 893 904 835 464 616 289 868 832 102 841 470 512 251 883 969 443 -38 695 779 757 879 -95 682 711 161 360 943 401 54 360 420 346 869 74 74 519 330 -14 965 903 24 404 759 714 758 261 876 588 878 596 666 958 -86 916 567 113 23 390 320 128 422 400 375 186 349 127 99 804 858 808 773 410 491 -15 669 371 77 540 667 624 430 565 -84 69 143 190 470 966 895 -97 760 628 262 307 92 -79 256 104 309 139 662 930 756 307 -66 248 51 697 927 116 321 23 15 951 264 780 171 819 379 655 570 685 794 870 -95 444 71 717 576 195 653 209 496 152 617 160 377 888 1 76 961 818 -77 309 334 194 627 378 -94 211 554 -77 771 791 556 28 349 108 841 -65 806 115 500 406 441 173 648 998 609 51 757 682 941 913 66 538 505 718 541 957 569 633 982 841 555 805 216 629 982 669 206 775 -31 205 713 -75 16 …
Output: 0

Constraints:

1 <= n <= 626; -100 <= a[i],x <= 1000.

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