

'''simple docstring'''







def  UpperCAmelCase__      ( UpperCAmelCase__			)     ->     int:
       A_		   = abs(UpperCAmelCase__			)
       A_		   = 0
       while n > 0:
              res += n % 10
              n //= 10
       return res
def  UpperCAmelCase__      ( UpperCAmelCase__			)     ->     int:
       A_		   = abs(UpperCAmelCase__			)
       return n if n < 10 else n % 10 + sum_of_digits(n // 10			)
def  UpperCAmelCase__      ( UpperCAmelCase__			)     ->     int:
       return sum(int(UpperCAmelCase__			) for c in str(abs(UpperCAmelCase__			)			)			)
def  UpperCAmelCase__      ( )     ->     None:
       from collections.abc import Callable
       from timeit import timeit

       def benchmark_a_function(UpperCAmelCase__,    UpperCAmelCase__			) -> None:
              A_		   = F'''{func.__name__}({value})'''
              A_		   = timeit(F'''__main__.{call}''',    setup="""import __main__"""			)
              print(F'''{call:56} = {func(UpperCAmelCase__			)} -- {timing:.4f} seconds'''			)

       for value in (26_21_44, 11_25_89_99_06_84_26_24, 1_26_76_50_60_02_28_22_94_01_49_67_03_20_53_76):
              for func in (sum_of_digits, sum_of_digits_recursion, sum_of_digits_compact):
                     benchmark_a_function(UpperCAmelCase__,    UpperCAmelCase__			)
              print()


if __name__ == "__main__":
      import doctest

      doctest.testmod()
      benchmark()



'''simple docstring'''







from __future__ import annotations

from typing import Any
def  UpperCAmelCase__      ( UpperCAmelCase__			)     ->     int:
       if not postfix_notation:
              return 0

       A_		   = {"""+""", """-""", """*""", """/"""}
       A_		   = []

       for token in postfix_notation:
              if token in operations:
                     A_   ,     A_		   = stack.pop(), stack.pop()
                     if token == "+":
                            stack.append(a + b			)
                     elif token == "-":
                            stack.append(a - b			)
                     elif token == "*":
                            stack.append(a * b			)
                     else:
                            if a * b < 0 and a % b != 0:
                                   stack.append(a // b + 1			)
                            else:
                                   stack.append(a // b			)
              else:
                     stack.append(int(UpperCAmelCase__			)			)

       return stack.pop()


if __name__ == "__main__":
      import doctest

      doctest.testmod()
