
"""simple docstring"""





from itertools import product







def 	__a     (		__lowerCamelCase,		__lowerCamelCase  ):
   UpperCAmelCase_					:					Dict			     =    sides_number
   UpperCAmelCase_					:					Optional[Any]			     =    max_face_number * dice_number
   UpperCAmelCase_					:					Optional[Any]			     =    [0] * (max_total + 1)

   UpperCAmelCase_					:					List[str]			     =    1
   UpperCAmelCase_					:					int			     =    range(__lowerCamelCase,		max_face_number + 1  )
   for dice_numbers in product(__lowerCamelCase,		repeat=__lowerCamelCase  ):
      UpperCAmelCase_					:					Union[str, Any]			     =    sum(__lowerCamelCase  )
      totals_frequencies[total] += 1

   return totals_frequencies







def 	__a     (		):
   UpperCAmelCase_					:					Optional[Any]			     =    total_frequency_distribution(
       sides_number=4,		dice_number=9  )
   UpperCAmelCase_					:					Union[str, Any]			     =    total_frequency_distribution(
       sides_number=6,		dice_number=6  )

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

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

   UpperCAmelCase_					:					Any			     =    round(__lowerCamelCase,		ndigits=7  )

   return rounded_peter_win_probability


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










"""simple docstring"""



from __future__ import annotations

from collections.abc import Iterator
from typing import Generic, TypeVar

_UpperCamelCase		:  Any						=		TypeVar('T')

class        a     (   Generic[T]	):







    def __init__(			self							,		_lowerCamelCase       ):
      lowercase							    =       data
      lowercase							    =       None







    def __str__(			self       ):
      return F'{self.data}'


class        a     (   Generic[T]	):







    def __init__(			self       ):
      lowercase							    =       None







    def __iter__(			self       ):
      lowercase							    =       self.top
      while node:
        yield node.data
        lowercase							    =       node.next







    def __str__(			self       ):
      return "->".join([str(_lowerCamelCase       ) for item in self]       )







    def __len__(			self       ):
      return len(tuple(iter(self       )       )       )







    def 			UpperCamelCase_      (			self       ):
      return self.top is None







    def 			UpperCamelCase_      (			self							,		_lowerCamelCase       ):
      lowercase							    =       Node(_lowerCamelCase       )
      if not self.is_empty():
        lowercase							    =       self.top
      lowercase							    =       node







    def 			UpperCamelCase_      (			self       ):
      if self.is_empty():
        raise IndexError('pop from empty stack'       )
      assert isinstance(self.top							,		_lowerCamelCase       )
      lowercase							    =       self.top
      lowercase							    =       self.top.next
      return pop_node.data







    def 			UpperCamelCase_      (			self       ):
      if self.is_empty():
        raise IndexError('peek from empty stack'       )

      assert self.top is not None
      return self.top.data







    def 			UpperCamelCase_      (			self       ):
      lowercase							    =       None


if __name__ == "__main__":
    from doctest import testmod

    testmod()


