


def 					lowerCamelCase_   (	_a     ,       _a	):




		"""simple docstring"""






		if number < 0 or shift_amount < 0:
				raise ValueError('''both inputs must be positive integers'''	)

		lowerCAmelCase__       :      Any   					= str(bin(lowerCAmelCase__	)	)
		binary_number += "0" * shift_amount
		return binary_number






def 					lowerCamelCase_   (	_a     ,       _a	):




		"""simple docstring"""






		if number < 0 or shift_amount < 0:
				raise ValueError('''both inputs must be positive integers'''	)

		lowerCAmelCase__       :      Union[str, Any]   					= str(bin(lowerCAmelCase__	)	)[2:]
		if shift_amount >= len(lowerCAmelCase__	):
				return "0b0"
		lowerCAmelCase__       :      Union[str, Any]   					= binary_number[: len(lowerCAmelCase__	) - shift_amount]
		return "0b" + shifted_binary_number






def 					lowerCamelCase_   (	_a     ,       _a	):




		"""simple docstring"""






		if number >= 0:  # Get binary representation of positive number
				lowerCAmelCase__       :      Tuple   					= '''0''' + str(bin(lowerCAmelCase__	)	).strip('''-'''	)[2:]
		else:  # Get binary (2's complement) representation of negative number
				lowerCAmelCase__       :      Union[str, Any]   					= len(bin(lowerCAmelCase__	)[3:]	)  # Find 2's complement of number
				lowerCAmelCase__       :      Tuple   					= bin(abs(lowerCAmelCase__	) - (1 << binary_number_length)	)[3:]
				lowerCAmelCase__       :      Optional[int]   					= (
				    '''1''' + '''0''' * (binary_number_length - len(lowerCAmelCase__	)) + binary_number
				)

		if shift_amount >= len(lowerCAmelCase__	):
				return "0b" + binary_number[0] * len(lowerCAmelCase__	)
		return (
		    "0b"
		    + binary_number[0] * shift_amount
		    + binary_number[: len(lowerCAmelCase__	) - shift_amount]
		)


if __name__ == "__main__":
		import doctest

		doctest.testmod()








import math





class  _a							:




	def __init__( self						:		List[Any]		, _SCREAMING_SNAKE_CASE						:		Any=0		)->	Optional[Any]:  # a graph with Node 0,1,...,N-1
			lowerCAmelCase__       :      Optional[int]   					= n
			lowerCAmelCase__       :      List[Any]   					= [
			    [math.inf for j in range(0		, _SCREAMING_SNAKE_CASE		)] for i in range(0		, _SCREAMING_SNAKE_CASE		)
			]  # adjacency matrix for weight
			lowerCAmelCase__       :      str   					= [
			    [math.inf for j in range(0		, _SCREAMING_SNAKE_CASE		)] for i in range(0		, _SCREAMING_SNAKE_CASE		)
			]  # dp[i][j] stores minimum distance from i to j




	def 							UpperCAmelCase__( self						:		Optional[Any]		, _SCREAMING_SNAKE_CASE						:		Optional[int]		, _SCREAMING_SNAKE_CASE						:		List[str]		, _SCREAMING_SNAKE_CASE						:		str		)->	List[str]:
			lowerCAmelCase__       :      Optional[int]   					= w




	def 							UpperCAmelCase__( self						:		List[Any]		)->	Optional[int]:
			for k in range(0		, self.n		):
					for i in range(0		, self.n		):
							for j in range(0		, self.n		):
									lowerCAmelCase__       :      Dict   					= min(self.dp[i][j]		, self.dp[i][k] + self.dp[k][j]		)




	def 							UpperCAmelCase__( self						:		str		, _SCREAMING_SNAKE_CASE						:		Any		, _SCREAMING_SNAKE_CASE						:		str		)->	str:
			return self.dp[u][v]


if __name__ == "__main__":
		lowerCamelCase						=		Graph(5)
		graph.add_edge(0, 2, 9)
		graph.add_edge(0, 4, 10)
		graph.add_edge(1, 3, 5)
		graph.add_edge(2, 3, 7)
		graph.add_edge(3, 0, 10)
		graph.add_edge(3, 1, 2)
		graph.add_edge(3, 2, 1)
		graph.add_edge(3, 4, 6)
		graph.add_edge(4, 1, 3)
		graph.add_edge(4, 2, 4)
		graph.add_edge(4, 3, 9)
		graph.floyd_warshall()
		graph.show_min(1, 4)
		graph.show_min(0, 3)




