#include <bits/stdc++.h>
using namespace std;
unsigned long long ans;
int main() {
  int m;
  cin >> m;
  for (int i = 1; m >= i; i++) {
    unsigned long long n, b, c;
    cin >> n >> b >> c;
    ans = n / 2 * min(2 * b, c) + (n % 2) * b;
    cout << ans << endl;
  }
  return 0;
}
