

def        UpperCAmelCase_     (		_A       ):





     '''simple docstring'''




     if a < 0:
          raise ValueError('''Input value must be a positive integer'''       )
     elif isinstance(_A   ,	_A       ):
          raise TypeError('''Input value must be a \'int\' type'''       )
     return bin(_A       ).count('''1'''       )


if __name__ == "__main__":
       import doctest

       doctest.testmod()





import random
def        UpperCAmelCase_     (		_A   ,	_A   ,	_A       ):





     '''simple docstring'''




     SCREAMING_SNAKE_CASE__					=					a[left_index]
     SCREAMING_SNAKE_CASE__					=					left_index + 1
     for j in range(left_index + 1   ,	_A       ):
          if a[j] < pivot:
               SCREAMING_SNAKE_CASE__,SCREAMING_SNAKE_CASE__					=					a[i], a[j]
               i += 1
     SCREAMING_SNAKE_CASE__,SCREAMING_SNAKE_CASE__					=					a[i - 1], a[left_index]
     return i - 1
def        UpperCAmelCase_     (		_A   ,	_A   ,	_A       ):





     '''simple docstring'''




     if left < right:
          SCREAMING_SNAKE_CASE__					=					random.randint(_A   ,	right - 1       )
          SCREAMING_SNAKE_CASE__,SCREAMING_SNAKE_CASE__					=					(
              a[left],
              a[pivot],
          )  # switches the pivot with the left most bound
          SCREAMING_SNAKE_CASE__					=					partition(_A   ,	_A   ,	_A       )
          quick_sort_random(
              _A   ,	_A   ,	_A       )  # recursive quicksort to the left of the pivot point
          quick_sort_random(
              _A   ,	pivot_index + 1   ,	_A       )  # recursive quicksort to the right of the pivot point
def        UpperCAmelCase_     (		):





     '''simple docstring'''




     SCREAMING_SNAKE_CASE__					=					input('''Enter numbers separated by a comma:\n'''       ).strip()
     SCREAMING_SNAKE_CASE__					=					[int(_A       ) for item in user_input.split(''','''       )]

     quick_sort_random(_A   ,	0   ,	len(_A       )       )

     print(_A       )


if __name__ == "__main__":
       main()


