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