import math
from timeit import timeit




def   _UpperCamelCase   (			snake_case__							)						->   Any:
							__UpperCAmelCase						:			int         =   0
							__UpperCAmelCase						:			List[Any]         =   abs(_A							)
							while True:
														__UpperCAmelCase						:			Any         =   n // 10
														digits += 1
														if n == 0:
																					break
							return digits




def   _UpperCamelCase   (			snake_case__							)						->   List[str]:
							return 1 if n == 0 else math.floor(math.log(abs(_A							),    10							) + 1							)




def   _UpperCamelCase   (			snake_case__							)						->   List[Any]:
							return len(str(abs(_A							)							)							)




def   _UpperCamelCase   (			)						->   Any:
							from collections.abc import Callable

							def benchmark_a_function(snake_case__,    snake_case__							) -> None:
														__UpperCAmelCase						:			str         =   f'''{func.__name__}({value})'''
														__UpperCAmelCase						:			Optional[int]         =   timeit(f'''__main__.{call}''',    setup="import __main__"							)
														print(f'''{call}: {func(_A							)} -- {timing} seconds'''							)

							for value in (26_2144, 1125_8999_0684_2624, 126_7650_6002_2822_9401_4967_0320_5376):
														for func in (num_digits, num_digits_fast, num_digits_faster):
																					benchmark_a_function(_A,    _A							)
														print()


if __name__ == "__main__":
	import doctest

	doctest.testmod()
	benchmark()





from __future__ import annotations




class 					_snake_case						:
					def __init__(  self:				List[Any]	,  __lowerCamelCase:				int = 0     )    ->				None:
												__UpperCAmelCase						:			Dict         =   value
												__UpperCAmelCase						:			Node | None         =   None
												__UpperCAmelCase						:			Node | None         =   None




def   _UpperCamelCase   (			snake_case__,    snake_case__							)						->   Node | None:
							if treea is None:
														return treea
							if treea is None:
														return treea

							__UpperCAmelCase						:			Tuple         =   treea.value + treea.value
							__UpperCAmelCase						:			Optional[Any]         =   merge_two_binary_trees(treea.left,    treea.left							)
							__UpperCAmelCase						:			List[str]         =   merge_two_binary_trees(treea.right,    treea.right							)
							return treea




def   _UpperCamelCase   (			snake_case__							)						->   None:
							if root:
														print(root.value							)
														print_preorder(root.left							)
														print_preorder(root.right							)


if __name__ == "__main__":
	_snake_case			=						Node(1)
	_snake_case			=						Node(2)
	_snake_case			=						Node(3)
	_snake_case			=						Node(4)

	_snake_case			=						Node(2)
	_snake_case			=						Node(4)
	_snake_case			=						Node(6)
	_snake_case			=						Node(9)
	_snake_case			=						Node(5)

	print('''Tree1 is: ''')
	print_preorder(treea)
	print('''Tree2 is: ''')
	print_preorder(treea)
	_snake_case			=						merge_two_binary_trees(treea, treea)
	print('''Merged Tree is: ''')
	print_preorder(merged_tree)




