#include <bits/stdc++.h>
using namespace std;
long long const inf = 1e9;
long long const mod = 1e9 + 7;
int main() {
  int q;
  cin >> q;
  while (q--) {
    long long n, a, b;
    cin >> n >> a >> b;
    if (a * 2 < b) b = a * 2;
    cout << (n / 2) * b + (n % 2) * a << endl;
  }
  return 0;
}
