
def 		_lowercase			(					lowercase__       ,     lowercase__						):
      if len(str(lowercase__						)						) == 1 or len(str(lowercase__						)						) == 1:
            return a * b

      __lowerCAmelCase :						Any = max(len(str(lowercase__						)						)       ,     len(str(lowercase__						)						)						)
      __lowerCAmelCase :						Optional[int] = ma // 2

      __lowerCAmelCase :						Tuple = divmod(lowercase__       ,     1_0**ma						)
      __lowerCAmelCase :						Any = divmod(lowercase__       ,     1_0**ma						)

      __lowerCAmelCase :						str = karatsuba(lowercase__       ,     lowercase__						)
      __lowerCAmelCase :						Optional[int] = karatsuba((aa + aa)       ,     (ba + ba)						)
      __lowerCAmelCase :						List[Any] = karatsuba(lowercase__       ,     lowercase__						)

      return (z * 1_0 ** (2 * ma)) + ((y - z - x) * 1_0 ** (ma)) + (x)







def 		_lowercase			(					):
      print(karatsuba(1_5_4_6_3       ,     2_3_4_8_9						)						)


if __name__ == "__main__":
 main()





import heapq







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


_UpperCamelCase			      =		{
    "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]],
}
_UpperCamelCase			      =		{
    "B": [["C", 1]],
    "C": [["D", 1]],
    "D": [["F", 1]],
    "E": [["B", 1], ["F", 3]],
    "F": [],
}
_UpperCamelCase			      =		{
    "B": [["C", 1]],
    "C": [["D", 1]],
    "D": [["F", 1]],
    "E": [["B", 1], ["G", 2]],
    "F": [],
    "G": [["F", 1]],
}

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

_UpperCamelCase			      =		dijkstra(Ga, "E", "F")
print(short_distance)  # E -- 3 --> F == 3

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

if __name__ == "__main__":
 import doctest

 doctest.testmod()


