CT21845

The Timeworn stamps of Fletcher

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Fletcher the paymaster watches over the honey farms of Buzzwell's stores of stamps. A careful computation stands between order and chaos. 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 <= 431; -100 <= a[i],x <= 1000000.

Example 1:

Input: 244 509511 445921 38939 874916 90459 118182 457852 252160 860868 79743 90528 496267 977847 753771 9975 712816 997699 763886 148573 508447 493833 948834 719118 372221 132672 498156 892929 617672 236487 176194 66947 550544 386221 983120 646690 292212 169663 222288 924927 765545 213481 637459 164083 647741 356634 983023 832605 428129 673660 267273 443096 676189 592940 414159 570759 442559 112036 278668 708689 385401 23131 453438 2694 543917 613436 212492 180721 978084 299950 906401 146865 503992 823723 836848 169869 785978 864049 188282 86954 992074 985712 467461 779594 411147 953738 259439 225026 977342 616552 63495 344775 60798 262629 175851 963747 179098 516131 97398 52134 229108 560970 4372 825665 15697 842466 30041 838306 719903 391056 402558 839789 962053 614765 934073 150471 987916 684…
Output: 0

Example 2:

Input: 150 608073 230176 63168 376881 377939 948522 915195 964566 960694 921424 730982 362945 577367 518258 725002 377135 922215 249712 387585 812377 775876 115772 263767 810944 240530 74395 176090 149830 562528 775122 151307 304962 173412 923050 815694 258674 154263 984161 404725 93482 547275 962585 425234 497614 902461 920095 148799 471661 590848 136952 519013 183352 83151 888394 337360 749833 650854 130480 507045 290003 949232 491051 651157 903664 700750 688278 422438 824566 445251 414942 636805 137279 87347 58511 55471 610436 657291 723555 377900 855118 793523 678724 564703 669395 556015 459041 92195 570064 233581 749722 535674 299677 250800 341716 706644 416721 860359 38688 615561 53010 215622 118842 847124 366764 287429 333307 559184 794689 61542 653261 367524 177594 701235 777044 394721 79…
Output: 0

Example 3:

Input: 156 374577 3879 14996 256117 796328 527500 78904 317972 781776 603601 525102 311319 552393 690366 770446 117425 593177 926580 962360 846367 53246 523583 479906 731721 849342 221301 716360 523895 38875 395347 800998 296901 347547 55339 303431 17491 925001 131905 173294 273606 377459 670553 917809 466092 881385 147910 621570 170279 223886 989440 9267 782412 80794 513843 980246 198673 722740 741814 889699 585314 228148 754211 765971 459342 501668 192230 946926 773016 970960 297464 435605 439882 543209 321463 458798 366419 416982 336595 329165 212580 70256 458592 872476 684071 579754 588373 790250 86286 271266 688622 423078 305377 805246 918703 40454 520153 715788 729240 28108 37095 30329 652954 363275 6028 886555 760205 652471 45944 369119 849227 640727 390493 470985 633862 779053 348430 8378…
Output: 0

Constraints:

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

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