

"""simple docstring"""




from __future__ import annotations

def 						A							(  snake_case__		,					snake_case__     ):




			'''simple docstring'''


			print(f"""Vertex\tShortest Distance from vertex {src}"""     )
			for i, d in enumerate(snake_case__     ):
						print(f"""{i}\t\t{d}"""     )

def 						A							(  snake_case__		,					snake_case__		,					snake_case__     ):




			'''simple docstring'''


			for j in range(snake_case__     ):
						SCREAMING_SNAKE_CASE__				,		SCREAMING_SNAKE_CASE__				,		SCREAMING_SNAKE_CASE__										=   (graph[j][k] for k in ["""src""", """dst""", """weight"""])
						if distance[u] != float("""inf"""     ) and distance[u] + w < distance[v]:
									return True
			return False

def 						A							(  snake_case__		,					snake_case__		,					snake_case__		,					snake_case__     ):




			'''simple docstring'''


			SCREAMING_SNAKE_CASE__										=   [float("""inf"""     )] * vertex_count
			SCREAMING_SNAKE_CASE__										=   0.0

			for _ in range(vertex_count - 1     ):
						for j in range(snake_case__     ):
									SCREAMING_SNAKE_CASE__				,		SCREAMING_SNAKE_CASE__				,		SCREAMING_SNAKE_CASE__										=   (graph[j][k] for k in ["""src""", """dst""", """weight"""])

									if distance[u] != float("""inf"""     ) and distance[u] + w < distance[v]:
												SCREAMING_SNAKE_CASE__										=   distance[u] + w

			SCREAMING_SNAKE_CASE__										=   check_negative_cycle(snake_case__		,					snake_case__		,					snake_case__     )
			if negative_cycle_exists:
						raise Exception("""Negative cycle found"""     )

			return distance


if __name__ == "__main__":
						import doctest

						doctest.testmod()

						A_				:      List[Any]           =			int(input("Enter number of vertices: ").strip())
						A_				:      Dict           =			int(input("Enter number of edges: ").strip())

						A_				:      list[dict[str, int]]           =			[{} for _ in range(E)]

						for i in range(E):
												print("Edge ", i + 1)
												A_       ,						A_       ,						A_				:      Any           =			(
												    int(x)
												    for x in input("Enter source, destination, weight: ").strip().split(" ")
												)
												A_				:      List[Any]           =			{"src": src, "dst": dest, "weight": weight}

						A_				:      List[str]           =			int(input("\nEnter shortest path source:").strip())
						A_				:      List[Any]           =			bellman_ford(graph, V, E, source)
						print_distance(shortest_distance, 0)





"""simple docstring"""




def 						A							(  snake_case__     ):




			'''simple docstring'''


			SCREAMING_SNAKE_CASE__										=   1
			SCREAMING_SNAKE_CASE__										=   2
			while i * i <= n:
						SCREAMING_SNAKE_CASE__										=   0
						while n % i == 0:
									n //= i
									multiplicity += 1
						n_divisors *= multiplicity + 1
						i += 1
			if n > 1:
						n_divisors *= 2
			return n_divisors

def 						A							(  ):




			'''simple docstring'''


			SCREAMING_SNAKE_CASE__										=   1
			SCREAMING_SNAKE_CASE__										=   1

			while True:
						i += 1
						t_num += i

						if count_divisors(snake_case__     ) > 5_00:
									break

			return t_num


if __name__ == "__main__":
						print(solution())


