#include <bits/stdc++.h>
using namespace std;
int main() {
  int q, a, b;
  long long cost, water, num;
  cin >> q;
  while (q--) {
    cin >> water >> a >> b;
    if (a <= b / 2) {
      cost = water * a;
    } else {
      num = water / 2;
      cost = (water - num * 2) * a + num * b;
    }
    cout << cost << '\n';
  }
}
