






import math

def      __lowercase					( snake_case ):







				"""simple docstring"""






				__magic_name__		:Dict        =      0
				__magic_name__		:Optional[Any]        =      0
				while num > 0:
								__magic_name__		:List[Any]        =      num % 8
								__magic_name__		:Any        =      octal + (remainder * math.floor(math.pow(1_0,  snake_case ) ))
								counter += 1
								__magic_name__		:List[str]        =      math.floor(num / 8 )  # basically /= 8 without remainder if any
								# This formatting removes trailing '.0' from `octal`.
				return f'''0o{int(snake_case )}'''

def      __lowercase					( ):







				"""simple docstring"""






				print('''\n2 in octal is:''' )
				print(decimal_to_octal(2 ) )  # = 2
				print('''\n8 in octal is:''' )
				print(decimal_to_octal(8 ) )  # = 10
				print('''\n65 in octal is:''' )
				print(decimal_to_octal(6_5 ) )  # = 101
				print('''\n216 in octal is:''' )
				print(decimal_to_octal(2_1_6 ) )  # = 330
				print('''\n512 in octal is:''' )
				print(decimal_to_octal(5_1_2 ) )  # = 1000
				print('''\n''' )


if __name__ == "__main__":
					main()














SCREAMING_SNAKE_CASE__      :			str							=		"""Alexander Joslin"""

import operator as op

from .stack import Stack

def      __lowercase					( snake_case ):







				"""simple docstring"""






				__magic_name__		:Optional[int]        =      {'''*''': op.mul, '''/''': op.truediv, '''+''': op.add, '''-''': op.sub}

				__magic_name__		:Stack[int]        =      Stack()
				__magic_name__		:Stack[str]        =      Stack()

				for i in equation:
								if i.isdigit():
												# RULE 1
												operand_stack.push(int(snake_case ) )
								elif i in operators:
												# RULE 2
												operator_stack.push(snake_case )
								elif i == ")":
												# RULE 4
												__magic_name__		:Optional[int]        =      operator_stack.peek()
												operator_stack.pop()
												__magic_name__		:List[str]        =      operand_stack.peek()
												operand_stack.pop()
												__magic_name__		:Optional[Any]        =      operand_stack.peek()
												operand_stack.pop()

												__magic_name__		:Optional[int]        =      operators[opr](snake_case,  snake_case )
												operand_stack.push(snake_case )

    # RULE 5
				return operand_stack.peek()


if __name__ == "__main__":
					SCREAMING_SNAKE_CASE__      :			Any							=		"""(5 + ((4 * 2) * (2 + 3)))"""
					# answer = 45
					print(f"{equation} = {dijkstras_two_stack_algorithm(equation)}")






