#include <bits/stdc++.h>
using namespace std;
long long n, a, b;
int main() {
  int T;
  cin >> T;
  while (T--) {
    cin >> n >> a >> b;
    cout << min(n * a, n / 2 * b + n % 2 * a) << endl;
  }
  return 0;
}
