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