"""simple docstring"""






from itertools import product



def   a_						(					lowerCamelCase					,			lowerCamelCase       ):
				UpperCAmelCase__             =							sides_number
				UpperCAmelCase__             =							max_face_number * dice_number
				UpperCAmelCase__             =							[0] * (max_total + 1)

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

				return totals_frequencies



def   a_						(					):
				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(lowerCamelCase					,			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(lowerCamelCase					,			ndigits=7       )

				return rounded_peter_win_probability


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




"""simple docstring"""






from PIL import Image



def   a_						(					lowerCamelCase					,			lowerCamelCase       ):
				UpperCAmelCase__             =							(2_5_9 * (level + 2_5_5)) / (2_5_5 * (2_5_9 - level))

				def contrast(lowerCamelCase       ) -> int:
								return int(1_2_8 + factor * (c - 1_2_8)       )

				return img.point(lowerCamelCase       )


if __name__ == "__main__":
						# Load image
						with Image.open('image_data/lena.jpg') as img:
												# Change contrast to 170
												lowerCAmelCase__  :  Any						     =	change_contrast(img, 170)
												cont_img.save('image_data/lena_high_contrast.png', format='png')



