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