#include <bits/stdc++.h>
int main() {
  int n;
  long long num = 0;
  scanf("%d", &n);
  long long qs[n][3];
  for (int i = 0; i < n; i++) {
    for (int x = 0; x < 3; x++) {
      scanf(" %I64d", &qs[i][x]);
    }
  }
  for (int i = 0; i < n; i++) {
    int c = qs[i][0] % 2;
    long long t = 2;
    long long k = qs[i][2] / t;
    if (qs[i][1] <= k) {
      num = qs[i][0] * qs[i][1];
    } else {
      num = c * qs[i][1] + (qs[i][0] - c) * qs[i][2] / 2;
    }
    printf("%I64d \n", num);
  }
  return 0;
}
