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