very short and optimized answer
```cpp []
class Solution {
public:
    int reverseDegree(string s){
        int n = s.size(), ans = 0;
        for(int i = 0; i < n; i++){
            int val = 'z' - s[i] + 1;
            ans += val * (i + 1);
        }
        return ans;
    }
};
```
['C++']