#include <bits/stdc++.h>
long long int n, a, b, t, i, q, r, p;
int main() {
  scanf("%I64d", &t);
  for (i = 1; i <= t; i++) {
    scanf("%I64d%I64d%I64d", &n, &a, &b);
    r = n % 2;
    if (r == 0)
      p = (n / 2) * b;
    else
      p = ((n / 2) * b) + a;
    q = n * a;
    if (p >= q)
      printf("%I64d\n", q);
    else
      printf("%I64d\n", p);
  }
  return 0;
}
