#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int x, num, cost1, cost2, money;
  cin >> x;
  for (int i = 0; i < x; i++) {
    cin >> num >> cost1 >> cost2;
    if (cost1 * 2 <= cost2) {
      money = cost1 * num;
    } else {
      money = cost2 * (num / 2);
      if (num % 2 == 1) money += cost1;
    }
    cout << money << endl;
  }
}
