




'''simple docstring'''

from itertools import product


def __UpperCAmelCase	(   _UpperCAmelCase		:   int		,				_UpperCAmelCase		:   int						)      ->      list[int]:
			__snake_case			=		sides_number
			__snake_case			=		max_face_number * dice_number
			__snake_case			=		[0] * (max_total + 1)

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

			return totals_frequencies


def __UpperCAmelCase	(   )      ->      float:
			__snake_case			=		total_frequency_distribution(
			    sides_number=4		,				dice_number=9						)
			__snake_case			=		total_frequency_distribution(
			    sides_number=6		,				dice_number=6						)

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

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

			__snake_case			=		round(_UpperCAmelCase		,				ndigits=7						)

			return rounded_peter_win_probability


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







def 		UpperCamelCase						(   lowercase_ )		->						float:


  '''simple docstring'''






  if not nums:  # Makes sure that the list is not empty
    raise ValueError("""List is empty""" )

  lowercase__	: int     		=   sum(lowercase_ ) / len(lowercase_ )  # Calculate the average
  return sum(abs(x - average ) for x in nums ) / len(lowercase_ )


if __name__ == "__main__":
     import doctest

     doctest.testmod()






