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