ZJUTOJ2020 ---2.摸鱼
#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
int main()
{
int T;
cin>>T;
while(T--)
{
int n,a,b;
cin>>n>>a>>b;
if(b<2*a)
{
if(n%2==0)
{
cout<<b*(n/2)<<endl;
}
else
{
cout<<b*(n/2)+a<<endl;
}
}
else
{
cout<<a*n<<endl;
}
}
return 0;
}