0%

Problem 22


Problem 22


Names score

Using names.txt(right click and ‘Save Link/Target As…’), a 46K text file containing over five-thousand first names, begin by sorting it into alphabetical order. Then working out the alphabetical value for each name, multiply this value by its alphabetical position in the list to obtain a name score.

For example, when the list is sorted into alphabetical order, COLIN, which is worth 3 + 15 + 12 + 9 + 14 = 53, is the 938th name in the list. So, COLIN would obtain a score of 938 × 53 = 49714.

What is the total of all the name scores in the file?


姓名得分

在这个46K的文本文件names.txt(右击并选择“目标另存为……”)中包含了五千多个姓名。首先将它们按照字母序排列,然后计算出每个姓名的字母值,乘以它在按字母顺序排列后的位置,以计算出姓名得分。

例如,按照字母序排列后,位于第938位的姓名COLIN的字母值是3 + 15 + 12 + 9 + 14 = 53。因此,COLIN的姓名得分是938 × 53 = 49714。

文件中所有姓名的姓名得分之和是多少?