func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     int n, m, a, b;     cin >> n >> m >> a >> b;     int q = m * a;     if (q < b) {       cout << n * a;     } else {       int v = n / m;       n -= v * m;       cout << v * b + min(b, n * a);     }   }   