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