#include <bits/stdc++.h>
using namespace std;
vector<long long> a;
int main() {
  int n;
  cin >> n;
  for (long long x, y, z, i = 1; i <= n; i++) {
    cin >> x >> y >> z;
    long long l = 0;
    if (x % 2 == 1) {
      l = y;
      x--;
      long long h = min(x * y, x / 2 * z);
      l = l + h;
    } else {
      l = min(x / 2 * z, x * y);
    }
    a.push_back(l);
  }
  for (long long i = 0; i < a.size(); i++) {
    cout << a[i] << endl;
  }
  return 0;
}
