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