func_code_string: #include <bits/stdc++.h>   using namespace std;   using ll = long long;   using pll = pair<ll, ll>;   using dd = long double;   namespace {   static bool constexpr dbg = 0;   ll constexpr N = -999;   ll n, k;   bool ok(string const &s1, string const &s2) {     do {       if (dbg) {         bool b = (s1.size() == s2.size() + 1);         if (!b)           cerr <<  s1.size() == s2.size() + 1                 <<  : failed! n ;       }     } while (0);     if (s1.size() != s2.size()) return s1.size() > s2.size();     for (int i = 0; i < n; ++i)       if (s1[i] != s2[i]) return s1[i] > s2[i];     return true;   }   string solve() {     string s;     cin >> n >> k >> s;     cout << n <<   n ;     auto sub = s.substr(0, k);     while (sub.size() < n) sub.push_back(sub[sub.size() - k]);     if (ok(sub, s)) return sub;     int i = k - 1;     for (; i >= 0; --i)       if (s[i] !=  9 ) break;     ++s[i];     for (++i; i < k; ++i) s[i] =  0 ;     for (int j = k; j < n; ++j) s[j] = s[j - k];     return s;   }   }  // namespace   int main() {     if (!dbg) {       std::ios::sync_with_stdio(0);       cin.tie(0);       cout.tie(0);     }     cout << fixed << setprecision(20);     cout << solve();     return 0;   }   