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