def       _snake_case	(   lowerCAmelCase							:   int   , lowerCAmelCase							:   list[int]   , lowerCAmelCase							:   int	):
		"""simple docstring"""







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




def       _snake_case	(   lowerCAmelCase							:   int   , lowerCAmelCase							:   list[int]   , lowerCAmelCase							:   int	):
		"""simple docstring"""







		def count_of_possible_combinations_with_dp_array(
		    lowerCAmelCase							:   int   , lowerCAmelCase							:   list[int]	) -> int:
				if target < 0:
						return 0
				if target == 0:
						return 1
				if dp_array[target] != -1:
						return dp_array[target]
				SCREAMING_SNAKE_CASE_  :		Union[str, Any]				      =    sum(
				    count_of_possible_combinations_with_dp_array(target - item   , lowerCAmelCase	)
				    for item in array	)
				SCREAMING_SNAKE_CASE_  :		Optional[int]				      =    answer
				return answer

		SCREAMING_SNAKE_CASE_  :		str				      =    [-1] * (target + 1)
		return count_of_possible_combinations_with_dp_array(lowerCAmelCase   , lowerCAmelCase	)




def       _snake_case	(   lowerCAmelCase							:   int   , lowerCAmelCase							:   list[int]   , lowerCAmelCase							:   int	):
		"""simple docstring"""







		SCREAMING_SNAKE_CASE_  :		Union[str, Any]				      =    [0] * (target + 1)
		SCREAMING_SNAKE_CASE_  :		Tuple				      =    1

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






from __future__ import annotations


def 						lowerCamelCase__    (		_A							):







	'''simple docstring'''





	snake_case_		    =     str(_A							)
	return len(_A							) == 9 and set(_A							) == set("123456789"							)


def 						lowerCamelCase__    (		):







	'''simple docstring'''





	for base_num in range(9999     ,	4999     ,	-1							):
		snake_case_		    =     100002 * base_num
		if is_9_pandigital(_A							):
			return candidate

	for base_num in range(333     ,	99     ,	-1							):
		snake_case_		    =     1002003 * base_num
		if is_9_pandigital(_A							):
			return candidate

	return None


if __name__ == "__main__":
		print(f'''{solution() = }''')
