#include <bits/stdc++.h>
using namespace std;
#define ll                 long long int
#define ld                long double
#define mod             1000000007
#define inf             1000000000000000000
#define endl            "\n"
#define pb                 push_back
#define vi              vector<ll>
#define vs                vector<string>
#define pii             pair<ll,ll>
#define ump                unordered_map
#define ff                 first
#define ss                 second
#define INF                20000000000000000
#define mid(l,r)        (l+(r-l)/2)
#define loop(i,a,b)     for(int i=(a);i<=(b);i++)
#define looprev(i,a,b)     for(int i=(a);i>=(b);i--)

void solve()
{
    ll n, a, b, i=0, m=0, q=0, mx=-INF, mn=INF;
    ll k=0, j=0, c=0, d=0, t=0, sm=0, pdt=1, l=0, r=0;
    cin>>n>>a>>b;
    string s;
    cin>>s;
    if(b >= 0)
    {
        cout<<a*n+b*n<<endl;
        return;
    }
    for(i=0; i<n; i++)
    {
        if(s[i] != s[i-1])
        {
            if(s[i] == '1')
                l++;
            else
                r++;
        }
    }
    if(s[0] == '1')
        l++;
    else
        r++;
    t = min(l,r)+1;
    cout<<a*n+b*t<<endl;
}

int main() 
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    ll t;
    cin >> t;
    // t = 1;
    while(t--){
        solve();
    }
    return 0;
}