#include <bits/stdc++.h>
using namespace std;
int main() {
  int q;
  cin >> q;
  while (q--) {
    long long n, a, b, cost = 0;
    cin >> n >> a >> b;
    if (n % 2) {
      if (n == 1)
        cost += a;
      else if (a * 2 >= b) {
        cost += b * (n / 2);
        cost += a;
      } else {
        cost += a * n;
      }
    } else {
      if (a * 2 >= b) {
        cost += b * (n / 2);
      } else {
        cost += a * n;
      }
    }
    cout << cost << endl;
  }
  return 0;
}
