
"""simple docstring"""

def       lowercase__  (   lowerCAmelCase			:   Dict	)	-> str:






    """simple docstring"""




    if not isinstance(_UpperCAmelCase	,			_UpperCAmelCase	):
        UpperCAmelCase       =   (
            'operation can not be conducted on a object of type '
            F"{type(_UpperCAmelCase	).__name__}"
        )
        raise TypeError(_UpperCAmelCase	)
    UpperCAmelCase       =   ''
    for _ in range(0	,			32	):
        bit_string += str(number % 2	)
        UpperCAmelCase       =   number >> 1
    return bit_string




def       lowercase__  (   lowerCAmelCase			:   Dict	)	-> List[str]:






    """simple docstring"""




    if number < 0:
        raise ValueError('the value of input must be positive'	)
    elif isinstance(_UpperCAmelCase	,			_UpperCAmelCase	):
        raise TypeError('Input value must be a \'int\' type'	)
    elif isinstance(_UpperCAmelCase	,			_UpperCAmelCase	):
        raise TypeError('\'<\' not supported between instances of \'str\' and \'int\''	)
    UpperCAmelCase       =   0
    # iterator over [1 to 32],since we are dealing with 32 bit integer
    for _ in range(1	,			33	):
        # left shift the bits by unity
        UpperCAmelCase       =   result << 1
        # get the end bit
        UpperCAmelCase       =   number % 2
        # right shift the bits by unity
        UpperCAmelCase       =   number >> 1
        # add that bit to our ans
        UpperCAmelCase       =   result | end_bit
    return get_reverse_bit_string(_UpperCAmelCase	)


if __name__ == "__main__":
   import doctest

   doctest.testmod()





"""simple docstring"""

from __future__ import annotations

SCREAMING_SNAKE_CASE_         =  '''Alexander Joslin'''




def       lowercase__  (   lowerCAmelCase			:   int	)	-> int:






    """simple docstring"""




    if number <= 0:
        UpperCAmelCase       =   F"n must be greater than 0. Got n = {number}"
        raise ValueError(lowerCAmelCase	)

    UpperCAmelCase       =   [number + 1] * (number + 1)

    # starting position
    UpperCAmelCase       =   0
    for i in range(1	,			lowerCAmelCase	):
        UpperCAmelCase       =   min(table[i + 1]	,			table[i] + 1	)
        # check if out of bounds
        if i * 2 <= number:
            UpperCAmelCase       =   min(table[i * 2]	,			table[i] + 1	)
        # check if out of bounds
        if i * 3 <= number:
            UpperCAmelCase       =   min(table[i * 3]	,			table[i] + 1	)
    return table[number]


if __name__ == "__main__":
   import doctest

   doctest.testmod()



