CT28048

Squire and the Dusky ledgers

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

The harbor bell rings at the smokehouses of Brineport; Squire weighs the day's ledgers manifests and starts the calculations. Task: Print how many array elements are less than or equal to x. Input format: First line: n and x. Second line: n integers. Output format: Print the count of elements <= x. Constraints: 1 <= n <= 483; 0 <= a[i],x <= 1000.

Example 1:

Input: 375 102 290 872 126 970 81 373 686 540 734 344 351 927 995 880 127 75 677 88 831 288 252 620 590 727 904 479 825 766 80 509 834 591 82 358 898 424 50 53 557 516 68 776 706 226 108 622 857 469 211 696 532 885 738 437 755 673 596 88 646 188 496 149 743 364 886 764 540 844 680 227 495 517 527 187 401 34 980 550 257 286 858 232 181 72 365 331 783 29 816 127 202 601 614 762 226 753 584 86 904 637 489 96 35 578 943 126 381 887 517 224 480 930 3 632 453 251 842 623 989 539 784 395 297 491 920 74 379 783 161 181 629 264 515 17 351 235 793 335 596 788 87 196 810 364 441 617 577 354 743 150 706 555 660 550 248 426 797 601 191 354 56 452 803 683 673 592 91 441 391 349 147 115 352 505 585 465 371 87 475 921 985 371 106 713 271 350 486 544 339 153 946 238 659 458 512 577 566 256 298 21 601 119 481 546 …
Output: 45

Example 2:

Input: 131 980 829 188 798 879 280 803 949 153 18 765 326 486 448 778 194 130 595 10 866 847 694 577 675 267 204 876 448 190 13 722 667 764 913 709 276 648 412 941 934 902 285 876 501 436 671 998 30 77 962 742 362 245 951 721 27 816 876 129 280 478 674 699 291 677 56 186 195 451 766 645 802 318 158 753 818 723 718 775 427 138 805 823 799 839 647 846 96 463 842 764 255 52 759 743 224 782 70 371 550 270 476 270 852 143 611 550 878 781 701 678 643 500 328 670 618 842 826 183 845 203 595 113 717 760 355 69 295 433 203 456 106
Output: 130

Example 3:

Input: 462 600 856 759 195 759 822 815 710 529 498 357 443 336 859 38 104 168 389 890 416 623 510 894 448 497 899 291 11 292 400 580 458 154 28 904 944 788 543 321 821 519 760 77 263 522 507 117 578 414 910 716 987 915 713 171 942 401 31 998 661 202 123 460 607 497 218 576 655 865 852 692 909 339 657 79 294 481 354 399 793 510 3 944 753 439 99 991 219 654 411 687 731 925 283 667 665 835 427 955 433 687 486 259 338 824 351 61 58 360 732 296 331 705 178 776 591 172 403 154 415 353 605 546 92 17 506 786 933 139 872 905 426 154 375 298 38 481 837 101 951 354 568 537 465 400 491 268 225 998 350 69 305 221 456 574 482 945 710 161 230 676 211 38 66 953 760 57 411 626 251 379 557 562 904 889 622 872 23 536 889 646 181 84 389 437 318 241 232 283 629 420 35 738 588 845 400 662 198 294 139 864 434 116 358 4…
Output: 285

Constraints:

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

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