
"""simple docstring"""



def lowerCamelCase_				(     _lowerCamelCase			:	Dict					,				_lowerCamelCase			:	str				):
       print('''\nThe shortest path matrix using Floyd Warshall algorithm\n'''				)
       for i in range(_lowerCamelCase				):
              for j in range(_lowerCamelCase				):
                     if dist[i][j] != float('''inf'''				):
                            print(int(dist[i][j]				)					,				end='''\t'''				)
                     else:
                            print('''INF'''					,				end='''\t'''				)
              print()


def lowerCamelCase_				(     _lowerCamelCase			:	int					,				_lowerCamelCase			:	str				):
       lowerCamelCase_       							=		[[float('''inf'''				) for _ in range(_lowerCamelCase				)] for _ in range(_lowerCamelCase				)]

       for i in range(_lowerCamelCase				):
              for j in range(_lowerCamelCase				):
                     lowerCamelCase_       							=		graph[i][j]

                     # check vertex k against all other vertices (i, j)
       for k in range(_lowerCamelCase				):
              # looping through rows of graph array
              for i in range(_lowerCamelCase				):
                     # looping through columns of graph array
                     for j in range(_lowerCamelCase				):
                            if (
                                dist[i][k] != float('''inf'''				)
                                and dist[k][j] != float('''inf'''				)
                                and dist[i][k] + dist[k][j] < dist[i][j]
                            ):
                                   lowerCamelCase_       							=		dist[i][k] + dist[k][j]

       _print_dist(_lowerCamelCase					,				_lowerCamelCase				)
       return dist, v


if __name__ == "__main__":
 __lowercase						:     List[str]							      =		int(input("""Enter number of vertices: """))
 __lowercase						:     str							      =		int(input("""Enter number of edges: """))

 __lowercase						:     Any							      =		[[float("""inf""") for i in range(v)] for j in range(v)]

 for i in range(v):
  __lowercase						:     Union[str, Any]							      =		0.0

  # src and dst are indices that must be within the array size graph[e][v]
  # failure to follow this will result in an error
 for i in range(e):
  print("""\nEdge """, i + 1)
  __lowercase						:     int							      =		int(input("""Enter source:"""))
  __lowercase						:     List[str]							      =		int(input("""Enter destination:"""))
  __lowercase						:     List[str]							      =		float(input("""Enter weight:"""))
  __lowercase						:     Optional[Any]							      =		weight

 floyd_warshall(graph, v)

 # Example Input
 # Enter number of vertices: 3
 # Enter number of edges: 2

 # # generated graph from vertex and edge inputs
 # [[inf, inf, inf], [inf, inf, inf], [inf, inf, inf]]
 # [[0.0, inf, inf], [inf, 0.0, inf], [inf, inf, 0.0]]

 # specify source, destination and weight for edge #1
 # Edge  1
 # Enter source:1
 # Enter destination:2
 # Enter weight:2

 # specify source, destination and weight for edge #2
 # Edge  2
 # Enter source:2
 # Enter destination:1
 # Enter weight:1

 # # Expected Output from the vertice, edge and src, dst, weight inputs!!
 # 0		INF	INF
 # INF	0	2
 # INF	1	0
def 	lowerCamelCase					(	UpperCamelCase     :				int							)   ->    bool:
		_lowerCamelCase				   =  (1 + 24 * n) ** 0.5
		return ((1 + root) / 6) % 1 == 0


def 	lowerCamelCase					(	UpperCamelCase     :				int = 50_00							)   ->    int:
		_lowerCamelCase				   =  [(i * (3 * i - 1)) // 2 for i in range(1			,       UpperCamelCase							)]
		for i, pentagonal_i in enumerate(UpperCamelCase							):
				for j in range(UpperCamelCase			,       len(UpperCamelCase							)							):
						_lowerCamelCase				   =  pentagonal_nums[j]
						_lowerCamelCase				   =  pentagonal_i + pentagonal_j
						_lowerCamelCase				   =  pentagonal_j - pentagonal_i
						if is_pentagonal(UpperCamelCase							) and is_pentagonal(UpperCamelCase							):
								return b

		return -1


if __name__ == "__main__":
				print(F'''{solution() = }''')