#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const long long linf = 0x3f3f3f3f3f3f3f;
const double eps = 1e-6;
const double pi = 3.14159265358979;
const int maxn = 1e3 + 5;
const int maxm = 2e5 + 5;
const long long mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int q;
  cin >> q;
  while (q--) {
    long long n, a, b;
    cin >> n >> a >> b;
    if (n & 1) {
      long long ans1 = n * a;
      long long ans2 = n / 2 * b + a;
      cout << min(ans1, ans2) << '\n';
    } else {
      long long ans1 = n * a;
      long long ans2 = n / 2 * b;
      cout << min(ans1, ans2) << '\n';
    }
  }
  return 0;
}
