#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  while (n--) {
    long long q;
    scanf("%lld", &q);
    int a, b;
    scanf("%d%d", &a, &b);
    double ap = 1.0 * a / 1, bp = 1.0 * b / 2;
    if (q % 2 == 0) {
      if (ap >= bp)
        printf("%lld\n", q / 2 * b);
      else
        printf("%lld\n", q * a);
    } else {
      printf("%lld\n", min(q * a, q / 2 * b + a));
    }
  }
  return 0;
}
