
"""simple docstring"""



from itertools import product


def  _UpperCamelCase	(						_A					,      _A      )    ->  Dict:





    """simple docstring"""

    _UpperCAmelCase          =   sides_number
    _UpperCAmelCase          =   max_face_number * dice_number
    _UpperCAmelCase          =   [0] * (max_total + 1)

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

    return totals_frequencies


def  _UpperCamelCase	(						)    ->  Dict:





    """simple docstring"""

    _UpperCAmelCase          =   total_frequency_distribution(
        sides_number=4					,      dice_number=9      )
    _UpperCAmelCase          =   total_frequency_distribution(
        sides_number=6					,      dice_number=6      )

    _UpperCAmelCase          =   0
    _UpperCAmelCase          =   9
    _UpperCAmelCase          =   4 * 9
    _UpperCAmelCase          =   6
    for peter_total in range(_A					,      max_peter_total + 1      ):
        peter_wins_count += peter_totals_frequencies[peter_total] * sum(
            colin_totals_frequencies[min_colin_total:peter_total]      )

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

    _UpperCAmelCase          =   round(_A					,      ndigits=7      )

    return rounded_peter_win_probability


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

"""simple docstring"""



from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


a					:	Tuple							=		{
    '''configuration_pegasus_x''': ['''PEGASUS_X_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''PegasusXConfig'''],
}

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 a					:	List[str]							=		[
     '''PEGASUS_X_PRETRAINED_MODEL_ARCHIVE_LIST''',
     '''PegasusXForConditionalGeneration''',
     '''PegasusXModel''',
     '''PegasusXPreTrainedModel''',
 ]


if TYPE_CHECKING:
 from .configuration_pegasus_x import PEGASUS_X_PRETRAINED_CONFIG_ARCHIVE_MAP, PegasusXConfig

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_pegasus_x import (
      PEGASUS_X_PRETRAINED_MODEL_ARCHIVE_LIST,
      PegasusXForConditionalGeneration,
      PegasusXModel,
      PegasusXPreTrainedModel,
  )


else:
 import sys

 a					:	Dict							=		_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)