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