func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     int n, k;     cin >> n >> k;     string s, ans, temp;     cin >> s;     int flag = 0;     for (int i = 0; i < k; i++) {       for (int j = i; j < n; j += k) {         if (s[i] != s[j]) {           flag = 1;           break;         }       }       if (flag) break;     }     if (!flag) {       cout << s.length() << endl;       cout << s << endl;       return 0;     }     for (int i = 0; i < k; i++) temp += s[i];     for (int i = 0; i < n / k; i++) ans += temp;     int i = 0;     while (ans.length() < s.length()) {       ans += temp[i];       i++;     }     if (ans >= s) {       cout << ans.length() << endl;       cout << ans << endl;       return 0;     }     i = 0, flag = 0;     for (i = k - 1; i >= 0; i--) {       if (s[i] <  9 ) {         s[i] = s[i] + 1;         flag = 1;         break;       }     }     if (flag) {       i++;       for (i; i < k; i++) s[i] =  0 ;     }     temp.clear(), ans.clear();     for (int i = 0; i < k; i++) temp += s[i];     for (int i = 0; i < n / k; i++) ans += temp;     i = 0;     while (ans.length() < s.length()) {       ans += temp[i];       i++;     }     cout << ans.length() << endl;     cout << ans << endl;   }   