#include <bits/stdc++.h>
int main() {
  long long int n, a, b, c, i, d = 0, e;
  scanf("%lld", &n);
  for (i = 1; i <= n; i++) {
    scanf("%lld%lld%lld", &a, &b, &c);
    e = c / b;
    if (e < 2 && e >= 0) {
      if (a % 2 == 0) {
        d = c * (a / 2);
      } else if (a % 2 != 0) {
        d = c * (a / 2) + b;
      }
    } else if (e == 2 || e > 2) {
      d = b * a;
    }
    printf("%lld\n", d);
    d = 0;
  }
  return 0;
}
