

def   __UpperCAmelCase					(      __a :     int      )     ->	int:

					"""simple docstring"""

					_a      :       str   =						abs(__a      )
					_a      :       Any   =						0
					while n > 0:
										res += n % 10
										n //= 10
					return res



def   __UpperCAmelCase					(      __a :     int      )     ->	int:

					"""simple docstring"""

					_a      :       Union[str, Any]   =						abs(__a      )
					return n if n < 10 else n % 10 + sum_of_digits(n // 10      )



def   __UpperCAmelCase					(      __a :     int      )     ->	int:

					"""simple docstring"""

					return sum(int(__a      ) for c in str(abs(__a      )      )      )



def   __UpperCAmelCase					(      )     ->	None:

					"""simple docstring"""

					from collections.abc import Callable
					from timeit import timeit

					def benchmark_a_function(__a :     Callable						,__a :     int      ) -> None:
										_a      :       str   =						F"""{func.__name__}({value})"""
										_a      :       List[Any]   =						timeit(F"""__main__.{call}"""						,setup='''import __main__'''      )
										print(F"""{call:56} = {func(__a      )} -- {timing:.4f} seconds"""      )

					for value in (262_144, 1_125_899_906_842_624, 1_267_650_600_228_229_401_496_703_205_376):
										for func in (sum_of_digits, sum_of_digits_recursion, sum_of_digits_compact):
															benchmark_a_function(__a						,__a      )
										print()


if __name__ == "__main__":
			import doctest

			doctest.testmod()
			benchmark()










'''simple docstring'''


from __future__ import annotations


def 						__a(SCREAMING_SNAKE_CASE_	:       list     ):



    '''simple docstring'''





    if not nums:
        raise ValueError("List is empty"     )
    return sum(SCREAMING_SNAKE_CASE_     ) / len(SCREAMING_SNAKE_CASE_     )


if __name__ == "__main__":
       import doctest

       doctest.testmod()


