


'''simple docstring'''







from itertools import product






def 				lowerCAmelCase__	(    lowerCamelCase					:      int  ,lowerCamelCase					:      int       ):
       _A					:     Optional[Any]     = sides_number
       _A					:     Union[str, Any]     = max_face_number * dice_number
       _A					:     Optional[Any]     = [0] * (max_total + 1)

       _A					:     List[str]     = 1
       _A					:     Dict     = range(lowerCamelCase  ,max_face_number + 1       )
       for dice_numbers in product(lowerCamelCase  ,repeat=lowerCamelCase       ):
              _A					:     List[Any]     = sum(lowerCamelCase       )
              totals_frequencies[total] += 1

       return totals_frequencies






def 				lowerCAmelCase__	(    ):
       _A					:     List[Any]     = total_frequency_distribution(
           sides_number=4  ,dice_number=9       )
       _A					:     Tuple     = total_frequency_distribution(
           sides_number=6  ,dice_number=6       )

       _A					:     str     = 0
       _A					:     List[str]     = 9
       _A					:     Dict     = 4 * 9
       _A					:     Any     = 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]       )

       _A					:     Any     = (4**9) * (6**6)
       _A					:     Dict     = peter_wins_count / total_games_number

       _A					:     Any     = round(lowerCamelCase  ,ndigits=7       )

       return rounded_peter_win_probability


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










'''simple docstring'''







def 				lowerCAmelCase__	(    lowerCamelCase					:      int = 10       ):
       if not isinstance(lowerCamelCase  ,lowerCamelCase       ) or n < 0:
              raise ValueError('Invalid input'       )
       _A					:     Optional[Any]     = 10**n
       _A					:     List[str]     = 28433 * (pow(2  ,7830457  ,lowerCamelCase       )) + 1
       return str(number % modulus       )


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

   testmod()
   print(f"""{solution(10) = }""")






