#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n[500];
  double a[500], b[500], q;
  cin >> q;
  for (int i = 0; i < q; i++) {
    cin >> n[i] >> a[i] >> b[i];
  }
  for (int i = 0; i < q; i++) {
    if (a[i] > (b[i] / 2)) {
      if (n[i] % 2 != 0) {
        cout << setprecision(15) << a[i] + ((b[i] * (n[i] - 1)) / 2) << endl;
      }
      if (n[i] % 2 == 0) {
        cout << setprecision(15) << (b[i] * n[i]) / 2 << endl;
      }
    }
    if (a[i] < (b[i] / 2)) {
      cout << setprecision(15)
           << ((b[i] * n[i]) / 2) + n[i] * (a[i] - (b[i] / 2)) << endl;
    }
    if (a[i] == (b[i] / 2)) {
      cout << setprecision(15) << (b[i] * n[i]) / 2 << endl;
    }
  }
}
