#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long q, n, a, b;
  cin >> q;
  while (q--) {
    cin >> n >> a >> b;
    if (n == 1) {
      cout << a << "\n";
    } else {
      if (n % 2) {
        long long temp1 = n * a;
        long long temp2 = b * (n - 1) / 2 + a;
        long long temp3 = (n - 2) * a + b;
        cout << min(temp1, min(temp2, temp3)) << "\n";
      } else {
        long long temp1 = n * a;
        long long temp2 = (n / 2) * b;
        cout << min(temp1, temp2) << "\n";
      }
    }
  }
}
