
"""simple docstring"""





from math import pi, sqrt



def  lowerCamelCase__						(     __snake_case      )				->						float:


					"""simple docstring"""





					if num <= 0:
										raise ValueError('''math domain error'''      )
					if num > 171.5:
										raise OverflowError('''math range error'''      )
					elif num - int(__snake_case      ) not in (0, 0.5):
										raise NotImplementedError('''num must be an integer or a half-integer'''      )
					elif num == 0.5:
										return sqrt(__snake_case      )
					else:
										return 1.0 if num == 1 else (num - 1) * gamma(num - 1      )



def  lowerCamelCase__						(     )				->						None:


					"""simple docstring"""





					assert gamma(0.5      ) == sqrt(__snake_case      )
					assert gamma(1      ) == 1.0
					assert gamma(2      ) == 1.0


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

				testmod()
				_a								=						1.0
				while num:
								_a								=						float(input("""Gamma of: """))
								print(F"""gamma({num}) = {gamma(num)}""")
								print("""\nEnter 0 to exit...""")








"""simple docstring"""




from itertools import product



def     __magic_name__		(					UpperCamelCase     :		int							,		UpperCamelCase     :		int     )     ->						list[int]:
    a__		=			sides_number
    a__		=			max_face_number * dice_number
    a__		=			[0] * (max_total + 1)

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

    return totals_frequencies



def     __magic_name__		(					)     ->						float:
    a__		=			total_frequency_distribution(
        sides_number=4							,		dice_number=9     )
    a__		=			total_frequency_distribution(
        sides_number=6							,		dice_number=6     )

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

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

    a__		=			round(UpperCamelCase							,		ndigits=7     )

    return rounded_peter_win_probability


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


