#include <bits/stdc++.h>
using namespace std;
bool compare(int a, int b) { return a > b; }
void fastio() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}
int main() {
  fastio();
  int t;
  cin >> t;
  for (int idx = 0; idx < t; idx++) {
    long long int a, b, c;
    cin >> a >> b >> c;
    if (2 * b > c) {
      long long int value = c * (a / 2) + (a % 2) * b;
      cout << value;
    } else {
      cout << a * b;
    }
    cout << "\n";
  }
  return 0;
}
