CT25989

Tracker's Tempest Ledger

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Morning light hits the shipyard of Keelwind as Tracker unrolls the day's manifest of stamps. The tally will decide the next shipment. 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 <= 990; 0 <= a[i],x <= 1000.

Example 1:

Input: 591 449 793 47 417 731 824 998 931 246 396 186 344 869 348 345 438 606 229 904 784 989 407 960 702 959 760 691 435 629 644 664 901 153 717 52 339 521 365 257 327 427 201 82 670 247 318 401 4 812 899 994 391 922 462 474 300 182 432 3 470 942 138 489 879 856 834 274 885 398 3 512 524 877 952 567 342 82 284 978 872 216 382 415 317 551 444 307 763 792 632 967 729 316 377 21 816 542 768 708 751 854 147 537 402 101 774 996 380 665 304 591 221 653 201 660 575 969 581 633 930 439 824 212 158 95 698 453 608 327 899 196 85 369 751 857 116 60 497 690 102 349 128 58 182 159 684 686 4 926 484 504 469 722 64 628 253 199 920 251 89 636 659 116 409 603 954 974 245 944 894 493 558 164 798 448 310 654 793 300 439 459 365 139 196 5 234 870 557 13 67 384 5 720 488 30 533 305 501 28 314 400 17 511 260 882 194 …
Output: 0

Example 2:

Input: 70 468 295 77 317 491 933 485 144 169 796 456 937 973 986 245 121 447 751 805 539 594 80 378 727 564 60 728 902 461 394 356 789 284 30 551 651 364 943 603 914 218 611 635 405 24 544 50 216 589 144 37 24 276 338 400 468 109 568 311 859 74 383 529 201 974 187 513 412 204 74 374
Output: 1

Example 3:

Input: 929 308 720 797 769 54 831 512 267 227 749 437 267 169 489 675 512 949 484 740 975 807 790 377 872 725 423 250 424 209 735 740 998 729 897 966 346 920 94 326 303 1000 886 847 236 68 878 762 426 169 69 967 308 282 849 170 821 275 212 951 891 575 70 760 824 541 87 572 594 205 511 644 447 481 515 982 256 770 770 966 843 244 961 727 70 397 940 69 535 881 661 627 896 317 927 713 311 543 244 713 752 500 780 227 673 945 919 493 449 612 197 965 952 689 349 814 536 479 403 373 146 554 128 895 830 806 603 641 822 440 389 114 212 288 894 241 40 732 562 81 276 700 419 514 24 985 942 838 208 178 851 358 619 627 103 398 477 468 479 629 949 937 622 119 998 489 724 673 845 549 159 446 984 558 349 338 800 763 96 416 428 858 75 271 756 606 509 104 830 384 395 827 30 149 378 9 7 188 757 471 996 509 190 289 1…
Output: 1

Constraints:

1 <= n <= 990; 0 <= a[i],x <= 1000.

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