





import math

class 					A     :



      def __init__(       self  ,	lowercase_=0       )   -> List[str]:  # a graph with Node 0,1,...,N-1



             '''simple docstring'''

             _snake_case   :				int  					=    n
             _snake_case   :				Tuple  					=    [
                 [math.inf for j in range(0  ,	snake_case__       )] for i in range(0  ,	snake_case__       )
             ]  # adjacency matrix for weight
             _snake_case   :				int  					=    [
                 [math.inf for j in range(0  ,	snake_case__       )] for i in range(0  ,	snake_case__       )
             ]  # dp[i][j] stores minimum distance from i to j



      def  __a			(       self  ,	lowercase_  ,	lowercase_  ,	lowercase_       )   -> int:



             '''simple docstring'''

             _snake_case   :				Optional[Any]  					=    w



      def  __a			(       self       )   -> int:



             '''simple docstring'''

             for k in range(0  ,	self.n       ):
                    for i in range(0  ,	self.n       ):
                           for j in range(0  ,	self.n       ):
                                  _snake_case   :				int  					=    min(self.dp[i][j]  ,	self.dp[i][k] + self.dp[k][j]       )



      def  __a			(       self  ,	lowercase_  ,	lowercase_       )   -> int:



             '''simple docstring'''

             return self.dp[u][v]


if __name__ == "__main__":
   lowerCAmelCase_				= Graph(5)
   graph.add_edge(0, 2, 9)
   graph.add_edge(0, 4, 1_0)
   graph.add_edge(1, 3, 5)
   graph.add_edge(2, 3, 7)
   graph.add_edge(3, 0, 1_0)
   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'''





import math







def snake_case_     (					lowercase__		):

  if 1 < number < 4:
    # 2 and 3 are primes
    return True
  elif number < 2 or number % 2 == 0 or number % 3 == 0:
    # Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
    return False

  # All primes number are in format of 6k +/- 1
  for i in range(5   ,       int(math.sqrt(lowercase__		) + 1		)   ,       6		):
    if number % i == 0 or number % (i + 2) == 0:
      return False
  return True







def snake_case_     (					lowercase__ = 0.1		):
  UpperCAmelCase__      :					Dict				       =							3
  UpperCAmelCase__      :					Tuple				       =							3

  while primes / (2 * j - 1) >= ratio:
    for i in range(j * j + j + 1   ,       (j + 2) * (j + 2)   ,       j + 1		):
      primes += is_prime(lowercase__		)
    j += 2
  return j


if __name__ == "__main__":
      import doctest

      doctest.testmod()



