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