AC Code

#include <bits/stdc++.h>
using namespace std;
int tt;
int n,x,y;
int main()
{
    cin >> tt;
    while(tt--)
    {
        cin >> n >> x >> y;
        int sum = 0;
        cout << max(((n - (n % 2)) / 2 * y + (n % 2) * x) , n * x) << endl;
    }
return 0;
}

0 comments

No comments so far...