#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int mod = 1e9 + 7;
const int N = 2e5 + 5;
void solve() {
  ll n, a, b, ans = 0;
  cin >> n >> a >> b;
  if (n & 1) {
    ans += a;
    n--;
  }
  ans += min(n / 2 * b, n * a);
  cout << ans << "\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int T = 1;
  cin >> T;
  while (T--) {
    solve();
  }
  return 0;
}
