#include <bits/stdc++.h>
using namespace std;
int dcmp(long double x, long double y) {
  return fabs(x - y) <= 1e-9 ? 0 : x < y ? -1 : 1;
}
const int MAX = 5500;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int tttt;
  cin >> tttt;
  while (tttt--) {
    long long n, a, b;
    cin >> n >> a >> b;
    long long ans = LLONG_MAX;
    ans = min(a * n, b * (n / 2LL) + (n % 2LL == 1LL ? a : 0LL));
    cout << ans << '\n';
  }
}
