



import heapq



def        __a     (    lowerCAmelCase_   :					Dict			,lowerCAmelCase_   :					Tuple			,lowerCAmelCase_   :					Tuple				)      -> Tuple:






						'''simple docstring'''



						UpperCAmelCase_=   [(0, start)]  # cost from start node,end node
						UpperCAmelCase_=   set()
						while heap:
												((UpperCAmelCase_),   (UpperCAmelCase_))=   heapq.heappop(lowerCAmelCase_				)
												if u in visited:
																		continue
												visited.add(lowerCAmelCase_				)
												if u == end:
																		return cost
												for v, c in graph[u]:
																		if v in visited:
																								continue
																		UpperCAmelCase_=   cost + c
																		heapq.heappush(lowerCAmelCase_			,(next_item, v)				)
						return -1


__A				    =						{
    '''A''': [['''B''', 2], ['''C''', 5]],
    '''B''': [['''A''', 2], ['''D''', 3], ['''E''', 1], ['''F''', 1]],
    '''C''': [['''A''', 5], ['''F''', 3]],
    '''D''': [['''B''', 3]],
    '''E''': [['''B''', 4], ['''F''', 3]],
    '''F''': [['''C''', 3], ['''E''', 3]],
}
__A				    =						{
    '''B''': [['''C''', 1]],
    '''C''': [['''D''', 1]],
    '''D''': [['''F''', 1]],
    '''E''': [['''B''', 1], ['''F''', 3]],
    '''F''': [],
}
__A				    =						{
    '''B''': [['''C''', 1]],
    '''C''': [['''D''', 1]],
    '''D''': [['''F''', 1]],
    '''E''': [['''B''', 1], ['''G''', 2]],
    '''F''': [],
    '''G''': [['''F''', 1]],
}

__A				    =						dijkstra(G, '''E''', '''C''')
print(short_distance)  # E -- 3 --> F -- 3 --> C == 6

__A				    =						dijkstra(Ga, '''E''', '''F''')
print(short_distance)  # E -- 3 --> F == 3

__A				    =						dijkstra(Ga, '''E''', '''F''')
print(short_distance)  # E -- 2 --> G -- 1 --> F == 3

if __name__ == "__main__":
	import doctest

	doctest.testmod()









def        __a     (    lowerCAmelCase_   :					int				)      -> int:






						'''simple docstring'''



						if number != int(lowerCAmelCase_				):
												raise ValueError("""factorial() only accepts integral values"""				)
						if number < 0:
												raise ValueError("""factorial() not defined for negative values"""				)
						UpperCAmelCase_=   1
						for i in range(1			,number + 1				):
												value *= i
						return value



def        __a     (    lowerCAmelCase_   :					int				)      -> int:






						'''simple docstring'''



						if not isinstance(lowerCAmelCase_			,lowerCAmelCase_				):
												raise ValueError("""factorial() only accepts integral values"""				)
						if n < 0:
												raise ValueError("""factorial() not defined for negative values"""				)
						return 1 if n == 0 or n == 1 else n * factorial(n - 1				)


if __name__ == "__main__":
	import doctest

	doctest.testmod()

	__A				    =						int(input('''Enter a positive integer: ''').strip() or 0)
	print(f'factorial{n} is {factorial(n)}')




