





from itertools import product





def     _UpperCamelCase     (a__   :int   ,			a__   :int       ):






				"""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     ():






				"""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() = }""")











def     _UpperCamelCase     (a__   :int       ):






							"""simple docstring"""





							if divisor % 5 == 0 or divisor % 2 == 0:
														return 0
							UpperCamelCase__				     =			1
							UpperCamelCase__				     =			1
							while repunit:
														UpperCamelCase__				     =			(10 * repunit + 1) % divisor
														repunit_index += 1
							return repunit_index





def     _UpperCamelCase     (a__   :int = 100_0000       ):






							"""simple docstring"""





							UpperCamelCase__				     =			limit - 1
							if divisor % 2 == 0:
														divisor += 1
							while least_divisible_repunit(a__       ) <= limit:
														divisor += 2
							return divisor


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




