CT32710

The At-Most Tally of Tangledeep

MediumL4 · Loop LordAcceptance: 0.0%XP: 35

Before the gates of the kelp forests of Tangledeep close for winter, Gino must finish the weights ledger - one figure at a time. 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 <= 5287; -1000000000 <= a[i],x <= 1000000000.

Example 1:

Input: 3457 372700558 634868581 348573013 95598333 -979676979 138154280 858649018 920920731 -79089380 34173629 153622211 549870964 -855394734 -523357880 726743308 -484737921 -508326925 -368605373 -953545235 -446671760 565773252 908071564 -114901284 -379898480 659572291 40953104 897103080 461004078 -243224506 -644841559 -659128567 339052000 -747741244 512876898 -493573664 124467180 967993359 -318283678 702939866 940490754 479874725 551617111 13103855 18753691 -64290798 278858244 893120767 283967500 404705627 -325142183 -641497533 161395075 -373634805 76498770 67887586 -877725001 -304626061 18719014 -853002498 -79570045 -761227711 578028602 -114238935 866130852 47110910 -475011865 -31164768 -722854098 569968806 352655258 -610519787 -904974301 957679210 531501177 -897879926 -734522834 -278143166 284…
Output: 2355

Example 2:

Input: 3062 -984819207 70068953 -674682885 596470354 -399684170 963997755 -581901208 -405213712 191344100 160876501 -361728697 -819914173 146066825 196659970 -284968992 151657256 328073741 -577345570 -66584903 825640006 193524810 911170694 680014746 -572047025 -546021912 511709011 63997304 -80630879 -201059030 232858286 -838217682 -635765002 647443279 19986861 -679231524 -470450348 -706942024 -252469864 803892384 -553330207 687374403 616361194 105829162 510191431 -999941924 488299724 947109687 161028869 172303370 -98866431 646588396 317962849 -574816079 175545862 790232849 465179248 773270222 816158903 634585513 -846048577 -383334769 -24159533 -119238220 -768570943 -243442554 472953117 446465234 765935059 51074300 -887097868 641148649 -347580743 944587943 -346051654 -923333174 768241398 -58208430…
Output: 21

Example 3:

Input: 1827 954096822 -56755265 873309289 922917899 589979988 -643139737 970095621 94898626 -50811206 -165995596 -323982296 969234388 -950133410 -221829620 -667489822 537234896 -221145681 -177511550 -490706775 978806902 475695075 405068152 -243250789 -478190092 903683934 -984450619 370722242 -400916499 679794970 -200574098 172249930 -32688197 403520868 -120417520 989695169 -591508462 -707315427 947571337 790535198 161317650 972732110 735475979 359668840 659870579 -639077983 725205808 -861872287 -399624929 -935396633 857162443 689211680 873477143 474636275 791135992 -269072104 225879009 533731978 -677443041 376267174 554581382 954506378 257557048 265399411 599090191 363707487 290094293 -1008464 -6658085 794175611 -867320007 -640894005 314838856 957119416 -805140449 -758195463 -468387239 -483605455…
Output: 1788

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
The At-Most Tally of Tangledeep - MEDIUM Coding Problem | CodeTikki