#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b);
void print(long long arr[], long long n);
void printv(vector<long long> arr);
signed main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n, a, b;
    cin >> n >> a >> b;
    if (2 * a <= b)
      cout << a * n << endl;
    else {
      long long ans = n / 2;
      ans *= b;
      if (n & 1) ans += a;
      cout << ans << endl;
    }
  }
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
void print(long long arr[], long long n) {
  for (long long i = 0; i < n; i++) cout << arr[i] << " ";
  cout << endl;
}
void printv(vector<long long> arr) {
  for (long long i = 0; i < arr.size(); i++) cout << arr[i] << " ";
  cout << endl;
}
