#include <bits/stdc++.h>
using namespace std;
long long n, a, b, t;
int main() {
  cin >> t;
  for (int z = 1; z <= t; z++) {
    cin >> n >> a >> b;
    cout << min(n * a, n / 2 * b + n % 2 * a) << "\n";
  }
  return 0;
}
