CT25378

The Solar Occurrence Count

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

In the gristmill of Rye Hollow, Potter the chronicler keeps careful count of the barrels. chart the migration season, every figure matters. 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 <= 960; -1000000 <= a[i],x <= 1000000000.

Example 1:

Input: 574 320419737 840245465 725945900 22300127 159773955 778937233 430138727 709388130 671848377 824842620 593910384 320032618 325597027 962281782 169783630 990277149 212265504 742085457 777051082 213634212 919798670 117005227 720678345 9444136 60702743 168962708 263135590 37668674 793622813 906286776 355566042 131587429 364277832 876962799 211700078 308240905 207854969 763483952 412957947 727933631 538621991 192983207 411423039 796106910 408351642 465580182 260622338 359733178 411161686 220224755 817332290 757810373 944451944 769208360 762058576 741976509 786256139 770326730 346698084 201644992 987724961 25196420 531066724 886450976 898671329 71906633 715751830 501664222 413828505 308592080 992824209 380494052 630426591 997737147 661522351 775720118 326438069 512597229 585812864 346808899 791…
Output: 0

Example 2:

Input: 324 339740538 580509643 183019687 533253953 678849384 457404556 747382791 387668659 590903382 723245381 356775170 715572966 591061354 64504490 917217332 415327698 195493259 443460721 628786273 569376841 459888242 150887790 128554535 752850112 770153582 855232066 213801132 971169769 495347531 201781764 233091166 749669434 963612763 7039060 525417374 433771828 78462289 826446565 722670653 379272101 111745435 69949049 353015607 231844574 816605837 554198761 765904833 738890785 411469663 20502108 575299012 347051766 753876983 718799631 954142462 492981398 282540055 119716849 521324351 615257742 402185894 710868933 281736903 108770224 314459340 222581100 330911493 436074207 84277770 845097573 716102901 185568178 123852327 799196326 846307502 548107065 150378351 379039626 902328897 16872632 6955…
Output: 0

Example 3:

Input: 514 328255824 682074859 783561021 873577472 854473801 747522567 596124896 666786173 757252648 480967374 674698534 305013243 934655261 178397169 873931929 38681500 851017137 732032237 837755001 389948812 832060448 196242681 758508233 293844009 285379127 411769799 719950443 482191982 622704499 672379549 624071238 412024133 699234420 799442540 687420636 678045140 155705633 248946468 431302161 844892733 535780987 843516688 120629418 504823642 823330677 479192777 537501409 970991558 2035886 169395568 266093516 542273547 854086060 233303658 628497367 820142182 903240305 487576359 467349602 826321725 707310265 50560511 807320441 525639121 332367281 251148927 4628987 267880438 32288324 574594403 544976 978190344 926984983 60948680 843815949 785986189 100984914 854380664 6065182 636999170 212470533…
Output: 0

Constraints:

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

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