



from itertools import product

def        a						(      _UpperCAmelCase							:					int ,   _UpperCAmelCase							:					int						):







		'''simple docstring'''





		__UpperCAmelCase    :     str													=	sides_number
		__UpperCAmelCase    :     Optional[Any]													=	max_face_number * dice_number
		__UpperCAmelCase    :     Optional[int]													=	[0] * (max_total + 1)

		__UpperCAmelCase    :     int													=	1
		__UpperCAmelCase    :     Tuple													=	range(_UpperCAmelCase ,   max_face_number + 1						)
		for dice_numbers in product(_UpperCAmelCase ,   repeat=_UpperCAmelCase						):
				__UpperCAmelCase    :     int													=	sum(_UpperCAmelCase						)
				totals_frequencies[total] += 1

		return totals_frequencies

def        a						(      ):







		'''simple docstring'''





		__UpperCAmelCase    :     str													=	total_frequency_distribution(
		    sides_number=4 ,   dice_number=9						)
		__UpperCAmelCase    :     Any													=	total_frequency_distribution(
		    sides_number=6 ,   dice_number=6						)

		__UpperCAmelCase    :     List[str]													=	0
		__UpperCAmelCase    :     Tuple													=	9
		__UpperCAmelCase    :     List[Any]													=	4 * 9
		__UpperCAmelCase    :     Dict													=	6
		for peter_total in range(_UpperCAmelCase ,   max_peter_total + 1						):
				peter_wins_count += peter_totals_frequencies[peter_total] * sum(
				    colin_totals_frequencies[min_colin_total:peter_total]						)

		__UpperCAmelCase    :     Optional[int]													=	(4**9) * (6**6)
		__UpperCAmelCase    :     Optional[Any]													=	peter_wins_count / total_games_number

		__UpperCAmelCase    :     str													=	round(_UpperCAmelCase ,   ndigits=7						)

		return rounded_peter_win_probability


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










from ...utils import (
    OptionalDependencyNotAvailable,
    is_torch_available,
    is_transformers_available,
    is_transformers_version,
)


try:
				if not (is_transformers_available() and is_torch_available()):
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				from ...utils.dummy_torch_and_transformers_objects import KandinskyPipeline, KandinskyPriorPipeline
else:
				from .pipeline_kandinsky import KandinskyPipeline
				from .pipeline_kandinsky_imgaimg import KandinskyImgaImgPipeline
				from .pipeline_kandinsky_inpaint import KandinskyInpaintPipeline
				from .pipeline_kandinsky_prior import KandinskyPriorPipeline, KandinskyPriorPipelineOutput
				from .text_encoder import MultilingualCLIP





