#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  long long int cnt, n, a, b, i = 0;
  cin >> cnt;
  while (i < cnt) {
    cin >> n >> a >> b;
    cout << (n / 2) * min(2 * a, b) + (n % 2) * a << endl;
    i++;
  }
}
