Problem Statement: You are given a string Str containing only lowercase letters. Your task is to calculate and print the Reverse ASCII power of the string.
The Reverse ASCII power of the string is calculated as the sum of for . Where is equal to .
(Note: , essentially assigning 'a'=26, 'b'=25... 'z'=1).
Input Format: The first line contains a string Str.
Output Format: Print the Reverse ASCII power of the string.
Example: Input: abc Output: 148
Problem Statement: Shengij goes to a dairy to buy milkshakes for a party. There are milkshakes numbered from 1 to , where the price of the milkshake is price[i], and the protein value in the milkshake is protein[i].
Shengij has discount coupons, and he can use each coupon at most one time. By using a discount coupon, he can halve the price (floor value) of any milkshake (But no more than one coupon can be applied to the same milkshake). Shengij wants to buy milkshakes such that the sum of prices does not exceed and the total protein value is the maximum possible.
Your task is to help Shengij find the maximum protein value.
Input Format:
Example: Input: 4 4 1 5 7 2 4 15 10 20 17 Output: 37
Explanation: Shengij can halve the price at most milkshake, and the total price does not exceed . It's better to halve the price of the fourth milkshake and buy the third and fourth milkshake. After buying the third and fourth milkshake, the total price = and the total protein value = . Therefore, the answer is 37.