#include <bits/stdc++.h>
int main() {
  long long int k, n, a, b, i, j;
  double y;
  scanf("%lld", &k);
  for (i = 0; i < k; i++) {
    scanf("%lld%lld%lld", &n, &a, &b);
    y = (double)b / 2.0;
    if (y > a) {
      printf("%lld\n", a * n);
    } else {
      long long int x = n / 2;
      printf("%lld\n", x * b + (n - x * 2) * a);
    }
  }
  return 0;
}
