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