'''simple docstring'''




def 							lowerCamelCase	(      UpperCAmelCase__       :					list      ,      UpperCAmelCase__       :					int = 0 )			->      list:
							lowercase_					:			Union[str, Any]										=       length or len(UpperCAmelCase__ )
							lowercase_					:			Optional[int]										=       False
							for i in range(length - 1 ):
														if list_data[i] > list_data[i + 1]:
																					lowercase_						,						lowercase_					:			Optional[int]										=       list_data[i + 1], list_data[i]
																					lowercase_					:			Optional[Any]										=       True

							return list_data if not swapped else bubble_sort(UpperCAmelCase__      ,      length - 1 )


if __name__ == "__main__":
						import doctest

						doctest.testmod()






'''simple docstring'''




from itertools import product




def 							lowerCamelCase	(      UpperCAmelCase__       :					int      ,      UpperCAmelCase__       :					int )			->      list[int]:
							lowercase_					:			List[Any]										=       sides_number
							lowercase_					:			Dict										=       max_face_number * dice_number
							lowercase_					:			List[str]										=       [0] * (max_total + 1)

							lowercase_					:			Union[str, Any]										=       1
							lowercase_					:			Dict										=       range(UpperCAmelCase__      ,      max_face_number + 1 )
							for dice_numbers in product(UpperCAmelCase__      ,      repeat=UpperCAmelCase__ ):
														lowercase_					:			Any										=       sum(UpperCAmelCase__ )
														totals_frequencies[total] += 1

							return totals_frequencies




def 							lowerCamelCase	(      )			->      float:
							lowercase_					:			Optional[Any]										=       total_frequency_distribution(
							    sides_number=4      ,      dice_number=9 )
							lowercase_					:			List[str]										=       total_frequency_distribution(
							    sides_number=6      ,      dice_number=6 )

							lowercase_					:			Union[str, Any]										=       0
							lowercase_					:			Tuple										=       9
							lowercase_					:			Optional[int]										=       4 * 9
							lowercase_					:			List[Any]										=       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] )

							lowercase_					:			str										=       (4**9) * (6**6)
							lowercase_					:			List[Any]										=       peter_wins_count / total_games_number

							lowercase_					:			Dict										=       round(UpperCAmelCase__      ,      ndigits=7 )

							return rounded_peter_win_probability


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





