func_code_string: #include <bits/stdc++.h>   void Solve();   int main() { Solve(); }   using namespace std;   const int INF = 1e9;   const int N = 20;   const double e = 1E-10;   int hm, am, dm;   int check(int ay, int dy) {     int m = max(0, ay - dm), y = max(0, am - dy);     if (!m) return -1;     return (hm / m + (hm % m != 0)) * y + 1;   }   void Solve() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     int hy, ay, dy, h, a, d, mn = 1e9;     cin >> hy >> ay >> dy >> hm >> am >> dm >> h >> a >> d;     for (int i = 0; i <= 200; i++) {       for (int j = 0; j <= 200; j++) {         int hp = check(ay + i, dy + j);         if (hp == -1) continue;         mn = min(mn, max(0, hp - hy) * h + i * a + j * d);       }     }     cout << mn;   }   