示例#1
0
文件: task22.py 项目: kamil157/euler
def solve():
    with open("../res/task22_names.txt") as file:
        names = file.read()[1:-1].split('","')
    return sum((i + 1) * word_value(name)
               for i, name in enumerate(sorted(names)))