CT26416

The At-Most Tally of Bloomhaven

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Jatin runs the counting house at the tulip beds of Bloomhaven. Today the books show a list of registers, and the numbers must be worked out before sundown. 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 <= 371; -1000000 <= a[i],x <= 1000.

Example 1:

Input: 172 -316682 -669800 -495179 -594088 -206770 -867543 -700146 -387130 -908127 -824341 -83816 -119170 -894413 -525738 -263669 -695751 -580025 -695236 -518963 -836004 -171063 -200030 -273514 -550199 -754126 -392067 -627552 -33703 -554554 -581012 -132679 -96090 -600423 -462919 -610460 -593560 -877217 -499102 -590262 -311259 -556289 -636594 -424292 -660701 -197240 -933924 -485863 -983910 -162738 -164812 -312577 -755077 -434908 -445866 -897991 -441940 -741711 -961580 -580905 -673701 -407867 -829008 -239827 -985204 -252275 -285239 -997651 -343566 -362160 -377650 -676255 -718 -402698 -778187 -145396 -258324 -14135 -118631 -937756 -587250 -468875 -511287 -248766 -962421 -587361 -472212 -670571 -295938 -259650 -976071 -938510 -557117 -522143 -324894 -561375 -100995 -696267 -35285 -409718 -960071 -146…
Output: 112

Example 2:

Input: 228 -689933 -799870 -164252 -607099 -963277 -977483 -718111 -557594 -156319 -463158 -726731 -772873 -416952 -431059 -529210 -992281 -444716 -697113 -394145 -155273 -976662 -693396 -86521 -433634 -67101 -511072 -612884 -535172 -935100 -73485 -452798 -978413 -566431 -149003 -313745 -326695 -93619 -186695 -289694 -258947 -855508 -812479 -367958 -57900 -610027 -600075 -577795 -420775 -586572 -887281 -530315 -518736 -188336 -283830 -381675 -428255 -66080 -221914 -171696 -985764 -904022 -215898 -196995 -839325 -146100 -506171 -737102 -128889 -906038 -368142 -235836 -275257 -731823 -319431 -890742 -224109 -842779 -756102 -819542 -572220 -207773 -277357 -415553 -54317 -591519 -801906 -55585 -522368 -608890 -338471 -622702 -891855 -75010 -741150 -443824 -768415 594 -350536 -663555 -87830 -245977 -2…
Output: 70

Example 3:

Input: 65 -327162 -158455 -567326 -319384 -839579 -756545 -49724 -589956 -291046 -318263 -74428 -386444 -50328 -700966 -992548 -394060 -5578 -90329 -392077 -360353 -737832 -536246 -111771 -55125 -144206 -813035 -181004 -167113 -955444 -414033 -159005 -180721 -733986 -914195 -806976 -885942 -115948 -892494 -498153 -200983 -387690 -813454 -806965 -722722 -640168 -283896 -426154 -275467 -574027 -255146 -17142 -905692 -817730 -819619 -198010 -744945 -119317 -989758 -607371 -107156 -694858 -164823 -554442 -242494 -520100 -686973
Output: 38

Constraints:

1 <= n <= 371; -1000000 <= a[i],x <= 1000.

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