#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(false);
  long long t;
  cin >> t;
  while (t--) {
    long long n, a, b;
    cin >> n >> a >> b;
    if (a * 2 >= b) {
      long long x = n / 2;
      x = x * b + (n % 2) * a;
      cout << x << endl;
    } else if (a < b) {
      cout << a * n << endl;
    }
  }
}
