




"""simple docstring"""







from timeit import timeit

def 						snake_case__       (					_lowerCamelCase				)			->int:






		"""simple docstring"""


		if number < 0:
				raise ValueError("the value of input must not be negative"				)
		__lowercase				:		List[Any]												=				0
		while number:
				number &= number - 1
				result += 1
		return result

def 						snake_case__       (					_lowerCamelCase				)			->int:






		"""simple docstring"""


		if number < 0:
				raise ValueError("the value of input must not be negative"				)
		__lowercase				:		List[Any]												=				0
		while number:
				if number % 2 == 1:
						result += 1
				number >>= 1
		return result

def 						snake_case__       (					)			->None:






		"""simple docstring"""


		def do_benchmark(_lowerCamelCase				) -> None:
				__lowercase				:		Union[str, Any]												=				"import __main__ as z"
				print(F'Benchmark when {number = }:'				)
				print(F'{get_set_bits_count_using_modulo_operator(_lowerCamelCase				) = }'				)
				__lowercase				:		List[str]												=				timeit("z.get_set_bits_count_using_modulo_operator(25)",  setup=_lowerCamelCase				)
				print(F'timeit() runs in {timing} seconds'				)
				print(F'{get_set_bits_count_using_brian_kernighans_algorithm(_lowerCamelCase				) = }'				)
				__lowercase				:		Dict												=				timeit(
				    "z.get_set_bits_count_using_brian_kernighans_algorithm(25)",  setup=_lowerCamelCase,  )
				print(F'timeit() runs in {timing} seconds'				)

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


if __name__ == "__main__":
						import doctest

						doctest.testmod()
						benchmark()






"""simple docstring"""







def 						snake_case__       (					_lowerCamelCase,  _lowerCamelCase				)			->int:






		"""simple docstring"""


		return abs(_lowerCamelCase				) if a == 0 else greatest_common_divisor(b % a,  _lowerCamelCase				)

def 						snake_case__       (					_lowerCamelCase,  _lowerCamelCase				)			->int:






		"""simple docstring"""


		while y:  # --> when y=0 then loop will terminate and return x as final GCD.
				__lowercase						,__lowercase				:		Any												=				y, x % y
		return abs(_lowerCamelCase				)

def 						snake_case__       (					)			->Optional[int]:






		"""simple docstring"""


		try:
				__lowercase				:		Optional[int]												=				input("Enter two integers separated by comma (,): "				).split(","				)
				__lowercase				:		Optional[Any]												=				int(nums[0]				)
				__lowercase				:		str												=				int(nums[1]				)
				print(
				    F'greatest_common_divisor({num_a}, {num_a}) = '
				    F'{greatest_common_divisor(_lowerCamelCase,  _lowerCamelCase				)}'				)
				print(F'By iterative gcd({num_a}, {num_a}) = {gcd_by_iterative(_lowerCamelCase,  _lowerCamelCase				)}'				)
		except (IndexError, UnboundLocalError, ValueError):
				print("Wrong input"				)


if __name__ == "__main__":
						main()
