




def     __magic_name__       (				A	:      int,						A	:      list[int],						A	:      int     ):






			'''simple docstring'''







			def count_of_possible_combinations(A	:      int     ) -> 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(A     )




def     __magic_name__       (				A	:      int,						A	:      list[int],						A	:      int     ):






			'''simple docstring'''







			def count_of_possible_combinations_with_dp_array(
			    A	:      int,						A	:      list[int]     ) -> int:
						if target < 0:
									return 0
						if target == 0:
									return 1
						if dp_array[target] != -1:
									return dp_array[target]
						a					=    sum(
						    count_of_possible_combinations_with_dp_array(target - item,						A     )
						    for item in array     )
						a					=    answer
						return answer

			a					=    [-1] * (target + 1)
			return count_of_possible_combinations_with_dp_array(A,						A     )




def     __magic_name__       (				A	:      int,						A	:      list[int],						A	:      int     ):






			'''simple docstring'''







			a					=    [0] * (target + 1)
			a					=    1

			for i in range(1,						target + 1     ):
						for j in range(A     ):
									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	:       Optional[int]     =	3
		__lowerCAmelCase	:       Dict     =	5
		__lowerCAmelCase	:       Tuple     =	[1, 2, 5]
		print(combination_sum_iv(n, array, target))












from typing import TYPE_CHECKING

from ....utils import _LazyModule


__lowerCAmelCase	:       int     =	{'tokenization_tapex': ['TapexTokenizer']}


if TYPE_CHECKING:
		from .tokenization_tapex import TapexTokenizer


else:
		import sys

		__lowerCAmelCase	:       Tuple     =	_LazyModule(__name__, globals()['__file__'], _import_structure)






