



import math
from timeit import timeit


def 	_A	(   _UpperCamelCase			):
				_UpperCAmelCase						:  str     					=	0
				_UpperCAmelCase						:  Tuple     					=	abs(_UpperCamelCase			)
				while True:
								_UpperCAmelCase						:  str     					=	n // 10
								digits += 1
								if n == 0:
												break
				return digits


def 	_A	(   _UpperCamelCase			):
				return 1 if n == 0 else math.floor(math.log(abs(_UpperCamelCase			)      ,					10			) + 1			)


def 	_A	(   _UpperCamelCase			):
				return len(str(abs(_UpperCamelCase			)			)			)


def 	_A	(   ):
				from collections.abc import Callable

				def benchmark_a_function(_UpperCamelCase      ,					_UpperCamelCase			) -> None:
								_UpperCAmelCase						:  List[str]     					=	F'''{func.__name__}({value})'''
								_UpperCAmelCase						:  Any     					=	timeit(F'''__main__.{call}'''      ,					setup='''import __main__'''			)
								print(F'''{call}: {func(_UpperCamelCase			)} -- {timing} seconds'''			)

				for value in (262_144, 1_125_899_906_842_624, 1_267_650_600_228_229_401_496_703_205_376):
								for func in (num_digits, num_digits_fast, num_digits_faster):
												benchmark_a_function(_UpperCamelCase      ,					_UpperCamelCase			)
								print()


if __name__ == "__main__":
					import doctest

					doctest.testmod()
					benchmark()





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


def 	_A	(   _UpperCamelCase			):
				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						:  Tuple     					=	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						:  List[str]     					=	result << 1
								# get the end bit
								_UpperCAmelCase						:  List[Any]     					=	number % 2
								# right shift the bits by unity
								_UpperCAmelCase						:  Optional[int]     					=	number >> 1
								# add that bit to our ans
								_UpperCAmelCase						:  Any     					=	result | end_bit
				return get_reverse_bit_string(_UpperCamelCase			)


if __name__ == "__main__":
					import doctest

					doctest.testmod()
