func_code_string: #include <bits/stdc++.h>   using namespace std;   int mas[100500];   int main() {     int n, k, p = 1, t;     bool cur = false;     char q;     string s =   , s1;     cin >> n >> k;     mas[1] = 1;     for (int i = 2; i <= n; i++) {       if (p < k) {         if (!cur)           mas[i] = n - mas[i - 1] + 1;         else           mas[i] = mas[i - 2] + 1;         if (!cur)           cur = true;         else           cur = false;         p++;       } else {         if (!cur) {           mas[i] = mas[i - 1] + 1;         } else {           mas[i] = mas[i - 1] - 1;         }       }     }     for (int i = 1; i <= n; i++) {       s1 =   ;       while (mas[i] > 0) {         q = mas[i] % 10 +  0 ;         mas[i] /= 10;         s1 = q + s1;       }       s += s1 +    ;     }     cout << s;     return 0;   }   