#include <bits/stdc++.h>
using namespace std;
long long fact[1000007];
long long mdpower(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res = (res % 1000000007 * a % 1000000007) % 1000000007;
    b /= 2;
    a = (a % 1000000007 * a % 1000000007) % 1000000007;
  }
  return res;
}
void factorial() {
  fact[0] = 1;
  for (int i = 1; i < 1000007; i++)
    fact[i] = (fact[i - 1] % 1000000007 * i % 1000000007) % 1000000007;
}
long long inverse(long long a, long long b) { return mdpower(a, b - 2); }
long long power(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res = (res * a);
    a = (a * a);
    b /= 2;
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long q;
  cin >> q;
  while (q--) {
    long long n, a, b;
    cin >> n >> a >> b;
    if (2 * a <= b) {
      cout << a * n << endl;
    } else {
      long long ans = 0;
      if (n % 2 == 0)
        cout << (n / 2) * b << endl;
      else
        cout << (n / 2) * b + a << endl;
    }
  }
}
