codeforces 1118A
一升油a元2生油b元,比较2 * a与b即可
#include<bits/stdc++.h>
using namespace std;
#define fst first
#define sec second
#define sci(num) scanf("%d",&num)
#define scl(num) scanf("%lld",&num)
#define mem(a,b) memset(a,b,sizeof a)
#define cpy(a,b) memcopy(a,b,sizeof b)
typedef long long LL;
typedef pair<int,int> P;
const int MAX_N = 2e5 + 100;
const int MAX_M = 310;
int main() {
ios::sync_with_stdio(false); cin.tie(0);
LL q,n,a,b;
cin >> q;
while (q--) {
cin >> n >> a >> b;
if (b >= 2 * a) {
cout << a * n << endl;
} else {
cout << n / 2 * b + n % 2 * a << endl;
}
}
return 0;
}