#include <iostream> #include <algorithm> using namespace std; void solve() { long long a, b, x; cin >> a >> b >> x; if (a <= b / 3) { cout << a * x << '\n'; } else { cout << (b * (x / 3) + min(b, a * (x % 3))) << '\n'; } } void run() { int t =...