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