类似leetcode的打家劫舍和爬楼梯 一个经典的dp
nums = [i for i in input()]
n=len(nums)
f = [0]*(n + 2)
for i, x in enumerate(nums):
f[i + 2] = max(f[i + 1], f[i] + ord(x)-96)
print(max(f[-2],f[-1]))
类似leetcode的打家劫舍和爬楼梯 一个经典的dp
nums = [i for i in input()]
n=len(nums)
f = [0]*(n + 2)
for i, x in enumerate(nums):
f[i + 2] = max(f[i + 1], f[i] + ord(x)-96)
print(max(f[-2],f[-1]))