//Adarsh Panigrahi
#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define ld long double
#define vi vector<ll>
#define mi map<ll,ll>
#define pi pair<ll,ll>
#define sortv(v) sort(v.begin(),v.end());
#define endl "\n"
#define pb push_back
#define FAST_IO ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)

const int MOD = 1e9 + 7;
int main()
{
     FAST_IO;
     
     ll test=1;
     cin>>test;
     while(test--)
     {
         ll n,a,b;
         cin>>n>>a>>b;

         string s;
         cin>>s;
         ll ans=0;

         
         if(b>=0)
         {
            ll each=a+b;
            ans=n*each;
         }
         else
         {
            
            ll ans0=0;
            char last='0';
            ll len=0;
            ll count=0;
            for(ll i=0;i<n;i++)
            {
                if(s[i]==last)
                {
                    len++;
                    count++;
                    if(i==n-1 || s[i+1]=='1')
                    {
                        ans0+= ((len*a)+b);
                        len=0;
                      //  cout<<"ans0: "<<ans0<<endl;
                    }
                }
               
            }


            ans0+= ((n-count)*a)+b;

            ll ans1=0;
            last='1';
            len=0;
            count=0;

            for(ll i=0;i<n;i++)
            {
               if(s[i]==last)
                {
                    len++;
                    count++;
                    if(i==n-1 || s[i+1]=='0')
                    {
                        ans1+= ((len*a)+b);
                        len=0;
                      //  cout<<"ans0: "<<ans0<<endl;
                    }
                }
    
            }

            ans1+=((n-count)*a)+b;

            ans=max(ans1,ans0);

         }

         cout<<ans<<endl;
        
     }
    return 0;
}
