#include <bits/stdc++.h>
using namespace std;
int main() {
  long long q;
  cin >> q;
  long long n;
  double a, b;
  while (q--) {
    cin >> n >> a >> b;
    double t1 = a / 1.0, t2 = b / 2.0;
    if (t1 <= t2)
      printf("%.0f\n", n * a);
    else
      printf("%.0f\n", n / 2 * b + n % 2 * a);
  }
  return 0;
}
