



'''simple docstring'''

def 				a  (     UpperCamelCase_    :    int			)       ->	int:

		if not isinstance(UpperCamelCase_      ,					UpperCamelCase_			):
				raise TypeError('only integers accepted as input'			)
		else:
				snake_case__	     =str(abs(UpperCamelCase_			)			)
				snake_case__	     =[list(UpperCamelCase_			) for char in range(len(UpperCamelCase_			)			)]
				for index in range(len(UpperCamelCase_			)			):
						num_transpositions[index].pop(UpperCamelCase_			)
				return max(
				    int(''.join(list(UpperCamelCase_			)			)			) for transposition in num_transpositions			)


if __name__ == "__main__":
			__import__('''doctest''').testmod()









'''simple docstring'''

from timeit import timeit






def 				a  (     UpperCamelCase_    :    int			)       ->	int:
		if number < 0:
				raise ValueError('the value of input must not be negative'			)
		snake_case__	     =0
		while number:
				number &= number - 1
				result += 1
		return result






def 				a  (     UpperCamelCase_    :    int			)       ->	int:
		if number < 0:
				raise ValueError('the value of input must not be negative'			)
		snake_case__	     =0
		while number:
				if number % 2 == 1:
						result += 1
				number >>= 1
		return result






def 				a  (     )       ->	None:

		def do_benchmark(UpperCamelCase_    :    int			) -> None:
				snake_case__	     ='import __main__ as z'
				print(f"""Benchmark when {number = }:"""			)
				print(f"""{get_set_bits_count_using_modulo_operator(UpperCamelCase_			) = }"""			)
				snake_case__	     =timeit('z.get_set_bits_count_using_modulo_operator(25)'      ,					setup=UpperCamelCase_			)
				print(f"""timeit() runs in {timing} seconds"""			)
				print(f"""{get_set_bits_count_using_brian_kernighans_algorithm(UpperCamelCase_			) = }"""			)
				snake_case__	     =timeit(
				    'z.get_set_bits_count_using_brian_kernighans_algorithm(25)'      ,					setup=UpperCamelCase_      ,					)
				print(f"""timeit() runs in {timing} seconds"""			)

		for number in (25, 37, 58, 0):
				do_benchmark(UpperCamelCase_			)
				print()


if __name__ == "__main__":
			import doctest

			doctest.testmod()
			benchmark()




