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