#include <bits/stdc++.h>
using namespace std;
const double PI = 3.14159265359;
const double EPS = 1e-6;
const long long INF = (1LL << 62);
const long long P = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long q, n, a, b;
  cin >> q;
  while (q--) {
    cin >> n >> a >> b;
    if (a * 2 <= b) {
      cout << a * n << "\n";
    } else {
      long long amnt = n / 2;
      n -= amnt * 2;
      cout << a * n + b * amnt << "\n";
    }
  }
  return 0;
}
