#include <bits/stdc++.h>
using namespace std;
long long int mod = 1e9 + 7;
void solve() {
  long long int n, a, b;
  cin >> n >> a >> b;
  long long int cost = 0;
  if (n % 2 == 1) {
    cost = a;
    n--;
  }
  cost += min(n * a, n / 2 * b);
  cout << cost << endl;
  return;
}
int main() {
  int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
