#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using R = double;
using Data = pair<ll, vector<int>>;
const ll MOD = 1e9 + 7;
const ll inf = 1LL << 50;
struct edge {
  ll from;
  ll to;
  ll cost;
};
int main() {
  int q;
  cin >> q;
  for (int i = 0; i < q; ++i) {
    ll n, a, b;
    cin >> n >> a >> b;
    if (2 * a <= b)
      cout << n * a << endl;
    else if (n % 2 == 0)
      cout << b * (n / 2) << endl;
    else
      cout << b * (n / 2) + a << endl;
  }
  return 0;
}
