
from itertools import product



def      __lowerCAmelCase						(							UpperCAmelCase__				:      int			,				UpperCAmelCase__				:      int       )  ->    list[int]:
							lowerCamelCase_							  =					sides_number
							lowerCamelCase_							  =					max_face_number * dice_number
							lowerCamelCase_							  =					[0] * (max_total + 1)

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

							return totals_frequencies



def      __lowerCAmelCase						(							)  ->    float:
							lowerCamelCase_							  =					total_frequency_distribution(
							    sides_number=4			,				dice_number=9       )
							lowerCamelCase_							  =					total_frequency_distribution(
							    sides_number=6			,				dice_number=6       )

							lowerCamelCase_							  =					0
							lowerCamelCase_							  =					9
							lowerCamelCase_							  =					4 * 9
							lowerCamelCase_							  =					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]       )

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

							lowerCamelCase_							  =					round(UpperCAmelCase__			,				ndigits=7       )

							return rounded_peter_win_probability


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







from ..utils import DummyObject, requires_backends





class       __A(				metaclass=UpperCAmelCase       ):
					SCREAMING_SNAKE_CASE			    =    ['''torch''', '''scipy''']

					def __init__(	self					:     Any   ,					*__UpperCamelCase					:     str   ,					**__UpperCamelCase					:     Any   ):
												requires_backends(self   ,					["""torch""", """scipy"""]   )

					@classmethod
					def    lowercase__      (	cls					:     Dict   ,					*__UpperCamelCase					:     str   ,					**__UpperCamelCase					:     Dict   ):
												requires_backends(cls   ,					["""torch""", """scipy"""]   )



					@classmethod
					def    lowercase__      (	cls					:     str   ,					*__UpperCamelCase					:     Optional[int]   ,					**__UpperCamelCase					:     Optional[int]   ):
												requires_backends(cls   ,					["""torch""", """scipy"""]   )





