#include <bits/stdc++.h>
using namespace std;
struct a {
  long long n;
  double a;
  double b;
} Q[510];
int main() {
  int q;
  cin >> q;
  for (int i = 0; i < q; ++i) cin >> Q[i].n >> Q[i].a >> Q[i].b;
  for (int i = 0; i < q; ++i) {
    if (Q[i].a < Q[i].b / 2.0) {
      long long sum = Q[i].a * Q[i].n;
      printf("%lld\n", sum);
    } else {
      long long sum = Q[i].n % 2 * Q[i].a + Q[i].n / 2 * Q[i].b;
      printf("%lld\n", sum);
    }
  }
  return 0;
}
