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