#include <bits/stdc++.h>
using namespace std;
int mcd(int, int);
int maxi(int, int, int);
int bus(int, int, int, vector<int>, int &, int &);
bool app(vector<int> &, int);
bool aparece(int, vector<int>);
long long gcd(long long, long long);
int min(int, int);
int max(int a, int b);
void recur(long long, long long, long long, char &);
bool dif(int a, int b);
long long ceil(long long, long long);
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long n, a, b, num, k;
    cin >> n >> a >> b;
    if (b >= 2 * a) {
      cout << n * a << endl;
    } else {
      k = n / 2;
      cout << b * k + (n - 2 * k) * a << endl;
    }
  }
}
bool dif(int a, int b) { return ((b - a) == 1) ? true : false; }
void recur(long long a, long long b, long long n, char &band) {
  if (n <= 1) {
    if (n == 1) {
      band = 'V';
    } else {
      return;
    }
  } else if (band == 'F') {
    if (n % a == 0 && a != 1) {
      n /= a;
      recur(a, b, n, band);
      n *= a;
    }
    if (band == 'F') {
      n -= b;
      recur(a, b, n, band);
    }
  }
}
long long gcd(long long a, long long b) {
  if (a == 0) {
    return b;
  } else {
    long long l = b % a;
    return gcd(l, a);
  }
}
long long ceil(long long m, long long d) {
  if (m % d != 0) {
    m += d;
  }
  return m / d;
}
int min(int a, int b) { return (a > b) ? b : a; }
int max(int a, int b) { return (a > b) ? a : b; }
