func_code_string: #include <bits/stdc++.h>   using namespace std;   const int MAXN = 100 + 7;   int n, k;   string second;   string s2;   string s1;   int main() {     cin >> n >> k;     cin >> second;     sort(second.begin(), second.end());     for (int i = 0; i < n; i++) {       if (second[i] != second[i + 1]) {         s2 += second[i];       }     }     second =   ;     second += s2;     sort(second.begin(), second.end());     for (int i = 0; i < second.size(); i++) {       s1 += second[i];       if (second[i] + 1 == second[i + 1] || second[i] == second[i + 1]) {         i++;       }     }     if (s1.size() >= k) {       int cnt = 0;       for (int i = 0; i < k; i++) {         cnt += s1[i] -  a  + 1;       }       cout << cnt;     } else {       cout << -1;     }   }   