
'''simple docstring'''



import os


def A ():
						with open(os.path.dirname(__lowerCamelCase						) + """/p022_names.txt"""						) as file:
												_lowerCAmelCase    		=					str(file.readlines()[0]						)
												_lowerCAmelCase    		=					names.replace("""\""""					,      """"""						).split(""","""						)

						names.sort()

						_lowerCAmelCase    		=					0
						_lowerCAmelCase    		=					0

						for i, name in enumerate(__lowerCamelCase						):
												for letter in name:
																		name_score += ord(__lowerCamelCase						) - 64

												total_score += (i + 1) * name_score
												_lowerCAmelCase    		=					0
						return total_score


if __name__ == "__main__":
						print(solution())


'''simple docstring'''



from itertools import product


def A (__lowerCamelCase :int					,      __lowerCamelCase :int						):
						_lowerCAmelCase    		=					sides_number
						_lowerCAmelCase    		=					max_face_number * dice_number
						_lowerCAmelCase    		=					[0] * (max_total + 1)

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

						return totals_frequencies


def A ():
						_lowerCAmelCase    		=					total_frequency_distribution(
						    sides_number=4					,      dice_number=9						)
						_lowerCAmelCase    		=					total_frequency_distribution(
						    sides_number=6					,      dice_number=6						)

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

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

						_lowerCAmelCase    		=					round(__lowerCamelCase					,      ndigits=7						)

						return rounded_peter_win_probability


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