



'''simple docstring'''





import math
def        _SCREAMING_SNAKE_CASE  (	UpperCamelCase      ):



    """simple docstring"""





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



    """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(65      )      )  # = 101
    print("""\n216 in octal is:"""      )
    print(decimal_to_octal(216      )      )  # = 330
    print("""\n512 in octal is:"""      )
    print(decimal_to_octal(512      )      )  # = 1000
    print("""\n"""      )


if __name__ == "__main__":
 main()







'''simple docstring'''





def        _SCREAMING_SNAKE_CASE  (	UpperCamelCase							,   UpperCamelCase							,   UpperCamelCase      ):



    """simple docstring"""





    def count_of_possible_combinations(UpperCamelCase      ) -> int:
        if target < 0:
            return 0
        if target == 0:
            return 1
        return sum(count_of_possible_combinations(target - item      ) for item in array      )

    return count_of_possible_combinations(UpperCamelCase      )
def        _SCREAMING_SNAKE_CASE  (	UpperCamelCase							,   UpperCamelCase							,   UpperCamelCase      ):



    """simple docstring"""





    def count_of_possible_combinations_with_dp_array(
        UpperCamelCase							,   UpperCamelCase      ) -> int:
        if target < 0:
            return 0
        if target == 0:
            return 1
        if dp_array[target] != -1:
            return dp_array[target]
        lowerCAmelCase__			:  Any											= sum(
            count_of_possible_combinations_with_dp_array(target - item							,   UpperCamelCase      )
            for item in array      )
        lowerCAmelCase__			:  Tuple											= answer
        return answer

    lowerCAmelCase__			:  Optional[int]											= [-1] * (target + 1)
    return count_of_possible_combinations_with_dp_array(UpperCamelCase							,   UpperCamelCase      )
def        _SCREAMING_SNAKE_CASE  (	UpperCamelCase							,   UpperCamelCase							,   UpperCamelCase      ):



    """simple docstring"""





    lowerCAmelCase__			:  str											= [0] * (target + 1)
    lowerCAmelCase__			:  List[Any]											= 1

    for i in range(1							,   target + 1      ):
        for j in range(UpperCamelCase      ):
            if i - array[j] >= 0:
                dp_array[i] += dp_array[i - array[j]]

    return dp_array[target]


if __name__ == "__main__":
 import doctest

 doctest.testmod()
 _lowerCAmelCase										=     3
 _lowerCAmelCase										=     5
 _lowerCAmelCase										=     [1, 2, 5]
 print(combination_sum_iv(n, array, target))


