CT27069

Orin's At-Most Tally Ledger

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Caravans arrive at the thorn maze of Bramblecourt with crates of ledgers, and Orin the factor must account for every last one. 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 <= 794; 0 <= a[i],x <= 1000000000.

Example 1:

Input: 392 708196375 19610701 510751299 226507184 685102490 811432365 990356794 469193333 886110257 472030070 100348818 719946535 562238582 406631973 304096553 824691202 104899359 75450558 978924464 277104825 518799671 492680001 469167264 559495730 713201874 523166117 545481395 964046772 389095485 686971015 770342224 169042337 409779458 549817649 761442124 270619923 593806011 780389095 156887474 309765756 5319537 494886928 792547156 704351001 99603559 546033270 45693125 980333486 978571340 406926594 217554834 573070599 581537075 315215074 162008867 237657220 592959134 561564900 597900728 585344143 735724191 386024328 640405275 37046072 794234216 571858490 925766070 215428870 535842152 659243153 192732620 746964057 209633134 270486872 102248725 610513940 840103463 380745114 851763148 724477578 455…
Output: 276

Example 2:

Input: 58 772437012 115130188 550513697 662929556 603583460 43452778 472213409 453285354 222756191 78230879 234314329 524068864 428000796 612976798 349175778 583530429 543548203 958882104 841651912 489078589 974024811 368890903 164820034 135812409 101296819 414989146 939279387 88091682 363773925 398961740 500324410 295460776 786052774 38899701 200995258 330784876 98894085 69588339 341459226 849790256 297358043 804217615 136217398 872014258 735262183 141019921 908311707 547444252 490231146 417568734 980921354 662341128 410957752 917498687 850697710 839816313 369847927 867442971 705280696
Output: 44

Example 3:

Input: 360 587303135 948678145 778089971 52060885 232884882 795692330 630703857 939290712 495884464 22403904 759370810 388063450 473919321 914934064 482051117 242180021 664056065 469707388 157837266 949345636 193529375 231151021 860876560 704581081 187049429 390056555 471182595 82772938 129549752 453255141 46640642 717784064 498098383 802978441 54498722 105686863 663844918 750180700 816238437 184792603 791997890 975085435 104243856 9739756 640385883 726581986 298889362 794051665 963472349 671911822 989705551 902942837 333275807 602554059 214822013 129654876 149404201 96404356 976278753 482803498 958163280 471313977 634082224 632741730 203090979 448388745 378897070 479674960 98540395 676601023 172925571 399100164 763885928 490074422 541250462 621389075 880747218 111072850 571525709 166819293 14931…
Output: 213

Constraints:

1 <= n <= 794; 0 <= a[i],x <= 1000000000.

Loading...
Test Cases:No test cases
No test cases available.
Orin's At-Most Tally Ledger - EASY Coding Problem | CodeTikki