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