




'''simple docstring'''





from itertools import product


def 					UpperCamelCase_(     snake_case							:	int							,    snake_case							:	int					):

							'''simple docstring'''






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

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

							return totals_frequencies


def 					UpperCamelCase_(     ):

							'''simple docstring'''






							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(snake_case							,    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(snake_case							,    ndigits=7					)

							return rounded_peter_win_probability


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










'''simple docstring'''





import logging
import os

from .state import PartialState




class 			_snake_case		(     logging.LoggerAdapter							):




			@staticmethod
			def        lowerCAmelCase__    ( a__							)    ->    Optional[Any]:

										'''simple docstring'''




										snake_case_      =				PartialState()
										return not main_process_only or (main_process_only and state.is_main_process)




			def        lowerCAmelCase__    ( self    ,							a__    ,							a__    ,							*a__    ,							**a__							)    ->    List[Any]:

										'''simple docstring'''




										if PartialState._shared_state == {}:
																	raise RuntimeError(
																	    "You must initialize the accelerate state by calling either `PartialState()` or `Accelerator()` before using the logging utility."							)
										snake_case_      =				kwargs.pop("main_process_only"    ,							a__							)
										snake_case_      =				kwargs.pop("in_order"    ,							a__							)

										if self.isEnabledFor(a__							):
																	if self._should_log(a__							):
																								snake_case_ ,				snake_case_      =				self.process(a__    ,							a__							)
																								self.logger.log(a__    ,							a__    ,							*a__    ,							**a__							)

																	elif in_order:
																								snake_case_      =				PartialState()
																								for i in range(state.num_processes							):
																															if i == state.process_index:
																																						snake_case_ ,				snake_case_      =				self.process(a__    ,							a__							)
																																						self.logger.log(a__    ,							a__    ,							*a__    ,							**a__							)
																															state.wait_for_everyone()


def 					UpperCamelCase_(     snake_case							:	str							,    snake_case							:	str = None					):

							'''simple docstring'''






							if log_level is None:
														snake_case_      =				os.environ.get("ACCELERATE_LOG_LEVEL"							,    snake_case					)
							snake_case_      =				logging.getLogger(snake_case					)
							if log_level is not None:
														logger.setLevel(log_level.upper()					)
														logger.root.setLevel(log_level.upper()					)
							return MultiProcessAdapter(snake_case							,    {}					)




