func_code_string: #include <bits/stdc++.h>   using namespace std;   int N;   vector<int> arr;   int main() {     cin >> N;     for (int i = 0; i < N; i++) {       int num;       cin >> num;       arr.push_back(num);     }     vector<int> cur(1000, 0);     int toto = 0;     for (int i = 0; i < N; i++) {       int zoto = toto;       for (int k = 0; k < cur.size(); k++) {         zoto -= cur[k];         int remo = (arr[i] - zoto) / 9 + ((arr[i] - zoto) % 9 ? 1 : 0);         if (arr[i] - zoto < 0) {           continue;         }         if (k < remo - 1 || cur[k] == 9)           continue;         else if (k == remo - 1) {           int montar = (arr[i] - zoto) % 9;           if (montar == 0) montar = 9;           if (zoto + montar + 9 * k > arr[i]) continue;           montar = max(montar, cur[k] + 1);           if (zoto + montar > arr[i]) continue;           toto -= cur[k];           cur[k] = montar;           toto += cur[k];         } else {           if (zoto + cur[k] + 1 > arr[i]) continue;           cur[k]++;           toto++;         }         int remy = arr[i] - (zoto + cur[k]);         for (int hu = 0; hu < k; hu++) {           if (remy >= 9) {             toto -= cur[hu];             cur[hu] = 9;             toto += cur[hu];             remy -= cur[hu];           } else if (remy >= 0) {             toto -= cur[hu];             cur[hu] = remy;             toto += cur[hu];             remy -= cur[hu];           } else             break;         }         break;       }       int maxx = 0;       for (int x = 0; x < cur.size(); x++) {         if (cur[x] != 0) maxx = x;       }       for (int x = maxx; x >= 0; x--) {         cout << cur[x];       }       cout << endl;     }   }   