#include <bits/stdc++.h>
using namespace std;
const int maxn = 5005;
int a[maxn];
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  int i, j;
  int t;
  cin >> t;
  long long n, a, b;
  while (t--) {
    cin >> n >> a >> b;
    if (2 * a <= b) {
      cout << n * a << endl;
    } else {
      long long num = n / 2;
      long long yushu = n % 2;
      cout << num * b + yushu * a << endl;
    }
  }
  return 0;
}
