#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long a, b, n;
    cin >> n >> a >> b;
    cout << min(2 * a, b) * (n / 2) + (n % 2) * a << "\n";
  }
  return 0;
}
