
'''simple docstring'''
from itertools import product






def      UpperCamelCase_				(      A__  ,      A__						):
	a_      				=						sides_number
	a_      				=						max_face_number * dice_number
	a_      				=						[0] * (max_total + 1)

	a_      				=						1
	a_      				=						range(A__  ,      max_face_number + 1						)
	for dice_numbers in product(A__  ,      repeat=A__						):
		a_      				=						sum(A__						)
		totals_frequencies[total] += 1

	return totals_frequencies






def      UpperCamelCase_				(      ):
	a_      				=						total_frequency_distribution(
	    sides_number=4  ,      dice_number=9						)
	a_      				=						total_frequency_distribution(
	    sides_number=6  ,      dice_number=6						)

	a_      				=						0
	a_      				=						9
	a_      				=						4 * 9
	a_      				=						6
	for peter_total in range(A__  ,      max_peter_total + 1						):
		peter_wins_count += peter_totals_frequencies[peter_total] * sum(
		    colin_totals_frequencies[min_colin_total:peter_total]						)

	a_      				=						(4**9) * (6**6)
	a_      				=						peter_wins_count / total_games_number

	a_      				=						round(A__  ,      ndigits=7						)

	return rounded_peter_win_probability


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


'''simple docstring'''
def      UpperCamelCase_				(      A__  ,      A__  ,      A__						):

	def count_of_possible_combinations(A__						) -> 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      UpperCamelCase_				(      A__  ,      A__  ,      A__						):

	def count_of_possible_combinations_with_dp_array(
	    A__  ,      A__						) -> 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      UpperCamelCase_				(      A__  ,      A__  ,      A__						):
	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()
		lowercase__											=3
		lowercase__											=5
		lowercase__											=[1, 2, 5]
		print(combination_sum_iv(n, array, target))
