func_code_string: #include <bits/stdc++.h>   using namespace std;   bool func(int x) {     int cnt = 0;     while (x != 0) {       x = x / 10;       cnt++;     }     if (cnt == 1)       return true;     else if (cnt == 2)       return false;     else if (cnt == 0)       return true;   }   int main() {     int h1, h2, m1, m2;     int h, m, temp;     char ch;     cin >> h1;     cin >> ch;     cin >> m1;     cin >> h2;     cin >> ch;     cin >> m2;     int dh, dm, t;     dh = h2 - h1;     dm = m2 - m1;     if (dm == 0) {       float g = (double)dh / 2;       g *= 60;       if (g >= 60) {         int ho = g / 60;         int mi = (long long)g % 60;         h = h1 + ho;         m = mi + m1;       } else {         m = m1 + g;         if (m >= 60) {           h = h1 + (m / 60);           m = m % 60;         } else           h = h1;       }     } else if (dh == 0) {       h = h1;       m = m1 + dm / 2;     } else {       if (dm < 0) {         --dh;         t = dh + (60 - m1) + m2;       } else {         dh;         t = dh * 60 + (m2 - m1);       }       t = t / 2;       if (t + m1 >= 60) {         int u = h1 + t / 60;         int left = t % 60;         if (m1 + left >= 60) {           ++u;           m = (left - (60 - m1));         } else           m = m1 + left;         h = u;       } else {         h = h1;         m = m1 + t;       }     }     if (func(h) == true && func(m) == true) {       cout <<  0  << h <<  :  <<  0  << m << endl;     } else if (func(h) && !func(m)) {       cout <<  0  << h <<  :  << m << endl;     } else if (!func(h) && func(m)) {       cout << h <<  :  <<  0  << m << endl;     } else       cout << h <<  :  << m << endl;   }   