





'''simple docstring'''


import math

class  lowerCAmelCase_		:




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




 def 				_snake_case (						self      ,  _lowerCAmelCase      ,  _lowerCAmelCase      ,  _lowerCAmelCase		)     ->				List[str]:
     _lowerCAmelCase						      =   w




 def 				_snake_case (						self		)     ->				Optional[Any]:
     for k in range(0      ,  self.n		):
         for i in range(0      ,  self.n		):
             for j in range(0      ,  self.n		):
                 _lowerCAmelCase						      =   min(self.dp[i][j]      ,  self.dp[i][k] + self.dp[k][j]		)





 def 				_snake_case (						self      ,  _lowerCAmelCase      ,  _lowerCAmelCase		)     ->				Any:
     return self.dp[u][v]


if __name__ == "__main__":
       _SCREAMING_SNAKE_CASE									=				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)



'''simple docstring'''




def 							snake_case__				(     _A:   int					)       ->      list[int]:

		'''simple docstring'''


		if length <= 0 or not isinstance(_A ,  _A					):
				raise ValueError("""Length must be a positive integer."""					)
		return [n * (2 * n - 1) for n in range(_A					)]


if __name__ == "__main__":
						print(hexagonal_numbers(length=5))
						print(hexagonal_numbers(length=1_0))




