题解 | #名字的漂亮度#
名字的漂亮度
https://www.nowcoder.com/practice/02cb8d3597cf416d9f6ae1b9ddc4fde3
n = int(input()) for i in range(n): s = input() l =[] res = [] ans = 0 for item in s: if item not in l: l.append(item) for j in l: res.append(s.count(j)) res = sorted(res,reverse=True) for j in range(len(res)): ans += (26-j)*res[j] print(ans)