CT21377

The Occurrence Count at Obsidian Shore

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

The council of the basalt cliffs of Obsidian Shore pays by the answer, and Tinker intends to earn it. First: the full register of coins. 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 <= 741; -100 <= a[i],x <= 1000000.

Example 1:

Input: 9 189287 409419 162768 28219 520325 935425 15392 141272 120373 917143
Output: 0

Example 2:

Input: 204 3356 281478 86710 632084 539865 38241 397670 388625 588508 852044 140886 883336 88648 716185 645864 83620 329171 467276 989011 920370 791260 791374 784800 43640 397386 390029 465968 967585 390375 342908 378050 863517 638956 403410 114821 911104 725764 244033 393651 516372 653859 180387 159019 878709 55289 991216 240121 760846 607530 152115 882160 446589 858099 52453 957557 636204 617101 196536 567627 738255 365668 254550 585684 258277 489987 23348 947084 702552 20844 43820 465137 772906 541225 235124 320683 773612 150717 847321 801593 591096 801371 558294 477457 157480 344658 34805 219514 150492 417187 314865 588324 97958 131247 601759 451780 179194 528681 990956 180970 894513 390990 661513 112471 57214 648182 848064 33399 182423 171492 610256 517649 831867 694410 34205 33279 214622 729636 8323 349634 850382 48379 67188 591957 852686 698852 312537 346949 30575 188786 698330 720527 241843 772883 587299 934947 234685 408333 954997 393040 466694 800781 727145 745149 992960 779907 467405 383932 555033 925185 57850 172345 323865 464395 448374 296043 24550 422339 506676 193929 68347 44211 480356 6748 471710 660932 349369 107774 709705 177855 939920 544467 816237 901770 847812 832527 392097 148994 459080 174001 10366 959694 127816 261626 665421 209562 8085 114600 509055 699396 367269 167676 453935 982802 335182 383743 980908 121705 681134 273786 59927 834661 321650 981369 374523 840931
Output: 0

Example 3:

Input: 392 71381 173510 13133 561482 871055 402455 106543 49267 548724 294796 378588 304312 19772 670903 339197 702299 866514 487021 144386 414286 914914 587210 800211 235724 161428 330720 207694 989562 495375 303598 670125 578053 275258 302880 52763 719916 925742 664045 643823 719187 159779 498297 987406 255785 316898 50256 471797 605299 346507 400518 148792 536808 180698 368049 354793 160099 764296 884933 263354 109486 395452 136458 652568 624301 43766 40043 934541 664028 70332 387507 153494 941144 948508 679675 214513 704267 514376 980780 163620 996770 131444 604132 602491 953870 699651 103945 902764 981083 804067 656863 638595 831614 685643 595928 483862 830447 242043 439680 716942 518910 398895 344019 216260 45329 679387 430693 581737 561969 685118 343965 219144 625292 402341 71339 129102 112137 98214 808378 978042 346795 949320 587812 369837 25256 379656 121289 524800 940235 288584 659223 468485 934314 985541 889709 895139 212845 862437 496783 389501 152200 169944 898840 589691 308843 621480 476288 896655 244250 635349 105226 151473 350088 890600 452083 91368 552120 84817 281511 786593 605543 541157 835817 845031 1492 961619 66673 885738 761900 685533 327171 82492 38373 366401 545808 63953 4152 309502 240696 885911 737183 8188 389343 994244 804417 224256 695138 775350 333852 633546 616044 74486 427323 238806 896631 769207 599823 436320 229395 152538 569659 580621 50584 393560 935520 560936 702869 296419 530226 251653 995021 789645 733459 931543 845358 281561 525962 332392 685998 82279 749957 107433 664261 34276 456461 995204 669170 946316 108910 514696 503816 320154 358536 648932 577299 529591 216377 625926 750710 255256 408905 347910 941894 755562 697412 437891 323891 332733 477852 296632 933081 175699 824470 522170 541466 38627 608771 603284 919041 743612 797777 210756 562338 851782 451988 125902 224055 207009 396815 312762 826240 934715 492809 699960 408394 175925 533814 249238 122141 409198 420827 243880 825293 781087 287658 880009 555101 901543 501189 849392 786356 637098 946144 410053 7714 783785 377734 119688 44707 433171 441541 342878 856078 338615 650101 778382 853488 460986 984544 367073 197401 979566 181502 891131 958154 278194 16884 438246 269467 346259 780401 840588 854426 730903 234217 617419 903389 418980 758191 929303 487378 960810 652615 663694 589159 268891 679511 552242 913168 187697 805086 945914 805228 835181 645432 176650 348509 185345 343597 584304 574282 181044 602673 210371 710441 683795 516014 74002 894024 66934 265689 191846 867680 294532 260166 800559 243466 61166 267800 676571 258702 254415 383329 911082 648327 896160 901388 351117 965480 101569 623469 20929 638115 895865 422435 392598 406400 542373 147476 395496 369634 566183 4601 186463
Output: 0

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
The Occurrence Count at Obsidian Shore - EASY Coding Problem | CodeTikki