Simple cpp solution
\nclass Solution {\npublic:\n    int scoreOfString(string s) {\n        int sum=0;\n        for(int i=0;i<s.size()-1;i++){\n            sum+=abs(static_cast<int
```\nclass Solution {\npublic:\n    int scoreOfString(string s) {\n        int sum=0;\n        for(int i=0;i<s.size()-1;i++){\n            sum+=abs(static_cast<int>(s[i]) - static_cast<int>(s[i + 1]));\n        }\n        return sum;\n    }\n};``\n```
['C++']