func_code_string: #include <bits/stdc++.h>   using namespace std;   long long gcd(long long a, long long b) {     if (a < 0) a = -a;     if (b < 0) b = -b;     return b == 0 ? a : gcd(b, a % b);   }   template <typename T>   void read(T &res) {     bool flag = false;     char ch;     while (!isdigit(ch = getchar())) (ch ==  - ) && (flag = true);     for (res = ch - 48; isdigit(ch = getchar());          res = (res << 1) + (res << 3) + ch - 48)       ;     flag && (res = -res);   }   long long lcm(long long a, long long b) { return a * b / gcd(a, b); }   long long qp(long long a, long long b, long long mod) {     long long ans = 1;     if (b == 0) {       return ans % mod;     }     while (b) {       if (b % 2 == 1) {         b--;         ans = ans * a % mod;       }       a = a * a % mod;       b = b / 2;     }     return ans % mod;   }   long long qpn(long long a, long long b, long long p) {     long long ans = 1;     a %= p;     while (b) {       if (b & 1) {         ans = (ans * a) % p;         --b;       }       a = (a * a) % p;       b >>= 1;     }     return ans % p;   }   char s[100006];   signed main() {     long long n, k;     read(n);     read(k);     scanf( %s , s + 1);     for (long long i = 1; i <= n - 1; i++) {       if (k == 0) {         break;       }       if (s[i] ==  4  && s[i + 1] ==  7 ) {         if (i % 2 == 1) {           s[i + 1] =  4 ;         } else {           if (s[i - 1] ==  4 ) {             if (k % 2 == 1) {               s[i] =  7 ;             } else {               s[i] =  4 ;             }             break;           } else {             s[i] =  7 ;           }         }         k--;       }     }     printf( %s , s + 1);   }   