#include <bits/stdc++.h>
using namespace std;
long long int balance(long long int k, long long int a[], long long int n) {
  long long int j = 0, z = 0, i, x = 0, y = 0, p = 0, q = 0, r = 0, s = 0,
                t = 0;
  z = n / k;
  for (i = 0; i < k; i++) {
    if (a[i] > z && a[i] != 0) {
      j = j + abs(z - a[i]);
    }
  }
  for (i = k; i < 26; i++) {
    j = j + a[i];
  }
  return (j);
}
int main() {
  long long int q, i, j, n, a, b, s, t;
  cin >> q;
  while (q--) {
    cin >> n >> a >> b;
    s = 2 * a;
    if (s < b) {
      cout << n * a << endl;
    } else {
      if (n % 2 == 0) {
        cout << n * b / 2 << endl;
      } else {
        n--;
        cout << (n * b / 2) + a << endl;
      }
    }
  }
}
