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