



import operator as op

def      __lowercase(						UpperCAmelCase__			):


      """simple docstring"""



      lowerCamelCase             =		[]
      lowerCamelCase             =		lambda UpperCAmelCase__ , UpperCAmelCase__			: int(x / y			)  # noqa: E731 integer division operation
      lowerCamelCase             =		{
          "^": op.pow,
          "*": op.mul,
          "/": div,
          "+": op.add,
          "-": op.sub,
      }  # operators & their respective operation

      # print table header
      print("Symbol".center(8			) , "Action".center(12			) , "Stack" , sep=" | "			)
      print("-" * (30 + len(UpperCAmelCase__			))			)

      for x in post_fix:
            if x.isdigit():  # if x in digit
                  stack.append(UpperCAmelCase__			)  # append x to stack
                  # output in tabular format
                  print(x.rjust(8			) , ("push(" + x + ")").ljust(12			) , ",".join(UpperCAmelCase__			) , sep=" | "			)
            else:
                  lowerCamelCase             =		stack.pop()  # pop stack
                  # output in tabular format
                  print("".rjust(8			) , ("pop(" + b + ")").ljust(12			) , ",".join(UpperCAmelCase__			) , sep=" | "			)

                  lowerCamelCase             =		stack.pop()  # pop stack
                  # output in tabular format
                  print("".rjust(8			) , ("pop(" + a + ")").ljust(12			) , ",".join(UpperCAmelCase__			) , sep=" | "			)

                  stack.append(
                      str(opr[x](int(UpperCAmelCase__			) , int(UpperCAmelCase__			)			)			)			)  # evaluate the 2 values popped from stack & push result to stack
                  # output in tabular format
                  print(
                      x.rjust(8			) , ("push(" + a + x + b + ")").ljust(12			) , ",".join(UpperCAmelCase__			) , sep=" | " , )

      return int(stack[0]			)


if __name__ == "__main__":
     a_    :  Tuple						  =		input('\n\nEnter a Postfix Equation (space separated) = ').split(' ')
     print('\n\tResult = ', solve(Postfix))




from __future__ import annotations

from math import pow, sqrt

def      __lowercase(						UpperCAmelCase__ , UpperCAmelCase__ , UpperCAmelCase__			):


      """simple docstring"""



      if (resistance, reactance, impedance).count(0			) != 1:
            raise ValueError("One and only one argument must be 0"			)
      if resistance == 0:
            return {"resistance": sqrt(pow(UpperCAmelCase__ , 2			) - pow(UpperCAmelCase__ , 2			)			)}
      elif reactance == 0:
            return {"reactance": sqrt(pow(UpperCAmelCase__ , 2			) - pow(UpperCAmelCase__ , 2			)			)}
      elif impedance == 0:
            return {"impedance": sqrt(pow(UpperCAmelCase__ , 2			) + pow(UpperCAmelCase__ , 2			)			)}
      else:
            raise ValueError("Exactly one argument must be 0"			)


if __name__ == "__main__":
     import doctest

     doctest.testmod()