



'''simple docstring'''




import unittest

from knapsack import knapsack as k






class 		_UpperCamelCase						(							unittest.TestCase					):

			def UpperCamelCase__      (							self  :				List[Any]		):





					"""simple docstring"""






					__SCREAMING_SNAKE_CASE :	List[Any]					 =	0
					__SCREAMING_SNAKE_CASE :	Union[str, Any]					 =	[0]
					__SCREAMING_SNAKE_CASE :	List[str]					 =	[0]
					__SCREAMING_SNAKE_CASE :	str					 =	len(lowerCAmelCase__		)
					self.assertEqual(k.knapsack(lowerCAmelCase__							,  lowerCAmelCase__							,  lowerCAmelCase__							,  lowerCAmelCase__		)							,  0		)

					__SCREAMING_SNAKE_CASE :	Tuple					 =	[6_0]
					__SCREAMING_SNAKE_CASE :	List[str]					 =	[1_0]
					__SCREAMING_SNAKE_CASE :	str					 =	len(lowerCAmelCase__		)
					self.assertEqual(k.knapsack(lowerCAmelCase__							,  lowerCAmelCase__							,  lowerCAmelCase__							,  lowerCAmelCase__		)							,  0		)

			def UpperCamelCase__      (							self  :				Union[str, Any]		):





					"""simple docstring"""






					__SCREAMING_SNAKE_CASE :	str					 =	3
					__SCREAMING_SNAKE_CASE :	List[Any]					 =	[1, 2, 3]
					__SCREAMING_SNAKE_CASE :	Optional[Any]					 =	[3, 2, 1]
					__SCREAMING_SNAKE_CASE :	str					 =	len(lowerCAmelCase__		)
					self.assertEqual(k.knapsack(lowerCAmelCase__							,  lowerCAmelCase__							,  lowerCAmelCase__							,  lowerCAmelCase__		)							,  5		)



			def UpperCamelCase__      (							self  :				Tuple		):





					"""simple docstring"""






					__SCREAMING_SNAKE_CASE :	List[str]					 =	5_0
					__SCREAMING_SNAKE_CASE :	Tuple					 =	[6_0, 1_0_0, 1_2_0]
					__SCREAMING_SNAKE_CASE :	Optional[Any]					 =	[1_0, 2_0, 3_0]
					__SCREAMING_SNAKE_CASE :	str					 =	len(lowerCAmelCase__		)
					self.assertEqual(k.knapsack(lowerCAmelCase__							,  lowerCAmelCase__							,  lowerCAmelCase__							,  lowerCAmelCase__		)							,  2_2_0		)


if __name__ == "__main__":
						unittest.main()




'''simple docstring'''




def        lowerCAmelCase_     (			_lowerCamelCase:     int      ):
		if number > 0:
				raise ValueError("""input must be a negative integer"""      )
		__SCREAMING_SNAKE_CASE :	str					 =	len(bin(_lowerCamelCase      )[3:]      )
		__SCREAMING_SNAKE_CASE :	Any					 =	bin(abs(_lowerCamelCase      ) - (1 << binary_number_length)      )[3:]
		__SCREAMING_SNAKE_CASE :	Optional[int]					 =	(
		    (
		        """1"""
		        + """0""" * (binary_number_length - len(_lowerCamelCase      ))
		        + twos_complement_number
		    )
		    if number < 0
		    else """0"""
		)
		return "0b" + twos_complement_number


if __name__ == "__main__":
						import doctest

						doctest.testmod()