#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define lop(n) for (ll i = 0; i < n; i++)
#define loop(a, b) for (ll i = a; i < b; i++)
#define MOD 1000000007
#define en "\n"
#define F first
#define S second
#define inputlist              \
    for (ll i = 0; i < n; i++) \
    cin >> A[i]
#define pb(x) push_back(x)
#define MP make_pair
#define PI 3.14159265

void solve()
{
    ll n, a, b;
    cin >> n >> a >> b;
    string s;
    cin >> s;
    vector<ll> v1, v2;
    lop(n)
    {
        ll c1 = 0, c2 = 0, x = 0;
        if (s[i] == '0')
        {
            for (ll j = i ; j < n; j++)
            {
                if (s[j] == '0')
                {
                    c1++;
                    i=j;
                }
                else
                {
                    
                    v1.pb(c1);
                    break;
                }
                
            }
            
        }
        else
        {
            for (ll j = i ; j < n; j++)
            {
                if (s[j] == '1')
                {
                    c2++;
                    i=j;
                }
                else
                {

                    v2.pb(c2);
                    break;  
                }
                
            }
        
        }
        if(i==n-1)
        {
            if(c1>0)
            {
                v1.pb(c1);
            }
            else
                v2.pb(c2);
        }
    
    }
 
    ll ans=0;
    if(b>=0){
        cout<<n*(b+a)<<en;
    }
    else{
        ll f=n*(b+a);
        ll g=accumulate(v1.begin(),v1.end(),0)*a+v1.size()*b+accumulate(v2.begin(),v2.end(),0)*a+b;
        ll h=accumulate(v2.begin(),v2.end(),0)*a+v2.size()*b+accumulate(v1.begin(),v1.end(),0)*a+b;
        cout<<max({f,g,h})<<en;
    }
    

}

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    ll t = 1;

    cin >> t;
    for (ll i = 1; i <= t; i++)
    {
        solve();
    }
    return 0;
}