#include <bits/stdc++.h>
using namespace std;
const long long N = (int)2e5 + 74, OO = 0x3f3f3f3f, MOD = (int)1e9 + 7;
class AWaterBuying {
 public:
  void solve(istream& cin, ostream& cout) {
    int T, testCases = 1;
    cin >> T;
    while (T--) {
      long long n;
      int a, b;
      cin >> n >> a >> b;
      if (a * 2 <= b) {
        cout << (long long)a * n << '\n';
      } else {
        cout << (long long)(b * (n / 2)) + ((n % 2 == 1) ? a : 0) << '\n';
      }
    }
  }
};
int main() {
  ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
  AWaterBuying solver;
  std::istream& in(std::cin);
  std::ostream& out(std::cout);
  solver.solve(in, out);
  return 0;
}
