#include <bits/stdc++.h>
using namespace std;
long long q, n, a, b;
void solve() {
  cin >> q;
  while (q--) {
    cin >> n >> a >> b;
    if (a * 2 <= b)
      cout << n * a << '\n';
    else
      cout << n / 2 * b + n % 2 * a << '\n';
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
}
