
"""simple docstring"""



import math


def  _UpperCamelCase	(						_A      )    ->  str:





    """simple docstring"""

    _UpperCAmelCase          =   0
    _UpperCAmelCase          =   0
    while num > 0:
        _UpperCAmelCase          =   num % 8
        _UpperCAmelCase          =   octal + (remainder * math.floor(math.pow(1_0					,      _A      )      ))
        counter += 1
        _UpperCAmelCase          =   math.floor(num / 8      )  # basically /= 8 without remainder if any
        # This formatting removes trailing '.0' from `octal`.
    return F"""0o{int(_A      )}"""


def  _UpperCamelCase	(						)    ->  None:





    """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()

"""simple docstring"""



from __future__ import annotations


def  _UpperCamelCase	(						_A      )    ->  None:





    """simple docstring"""

    create_state_space_tree(_A					,      []					,      0					,      [0 for i in range(len(_A      )      )]      )


def  _UpperCamelCase	(						_A					,      _A					,      _A					,      _A					,      )    ->  None:





    """simple docstring"""

    if index == len(_A      ):
        print(_A      )
        return

    for i in range(len(_A      )      ):
        if not index_used[i]:
            current_sequence.append(sequence[i]      )
            _UpperCAmelCase          =   True
            create_state_space_tree(_A					,      _A					,      index + 1					,      _A      )
            current_sequence.pop()
            _UpperCAmelCase          =   False
a					:	list[int | str]							=		[3, 1, 2, 4]
generate_all_permutations(sequence)

a					:	list[int | str]							=		["A", "B", "C"]







generate_all_permutations(sequence_a)