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