






"""simple docstring"""



from __future__ import annotations


def 	SCREAMING_SNAKE_CASE__       (  snake_case       : list[int | float]			,					snake_case       : int			,					snake_case       : int				)->		int | float:






     '''simple docstring'''



     if len(snake_case				) == 0:
          raise ValueError("find_max() arg is an empty sequence"				)
     if (
         left >= len(snake_case				)
         or left < -len(snake_case				)
         or right >= len(snake_case				)
         or right < -len(snake_case				)
     ):
          raise IndexError("list index out of range"				)
     if left == right:
          return nums[left]
     UpperCAmelCase__						:    List[str]							=							(left + right) >> 1  # the middle
     UpperCAmelCase__						:    List[str]							=							find_max(snake_case			,					snake_case			,					snake_case				)  # find max in range[left, mid]
     UpperCAmelCase__						:    int							=							find_max(snake_case			,					mid + 1			,					snake_case				)  # find max in range[mid + 1, right]

     return left_max if left_max >= right_max else right_max


if __name__ == "__main__":
 import doctest

 doctest.testmod(verbose=True)










"""simple docstring"""



import os


def 	SCREAMING_SNAKE_CASE__       (  )->		Optional[Any]:






     '''simple docstring'''



     with open(os.path.dirname(snake_case				) + "/p022_names.txt"				) as file:
          UpperCAmelCase__						:    Tuple							=							str(file.readlines()[0]				)
          UpperCAmelCase__						:    str							=							names.replace("\""			,					""				).split(","				)

     names.sort()

     UpperCAmelCase__						:    Optional[int]							=							0
     UpperCAmelCase__						:    List[str]							=							0

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

          total_score += (i + 1) * name_score
          UpperCAmelCase__						:    Optional[int]							=							0
     return total_score


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


