#include <bits/stdc++.h>
#include <vector>
#include <set>
using namespace std;
#define ll long long
#define MAX 10000000000
#define vll vector<ll>
#define IOS ios_base::sync_with_stdio(0); cin.tie(0);
void solve(){
   ll n,a,b,cnt=0,cnto=0,cntv=0,i,sum=0,mus=0;
   cin>>n>>a>>b;
   string s;
   cin>>s;
   if(b>=0)
    {
      cout<<(a+b)*(n);
      return;
    }
   for(i=0; i<n; i++)
    {
      if(s[i]=='0') cnto++;
      else cntv++;
    }
   for(i=0; i<n-1; i++)
      if(s[i]=='0' && s[i+1]=='1') cnt++;
   if(s[n-1]=='0') cnt++;
   sum=cnto*a+cnt*b+cntv*a+b;
   cnt=0;
   for(i=0; i<n-1; i++)
     if(s[i]=='1' && s[i+1]=='0') cnt++;
   if(s[n-1]=='1') cnt++;
   mus=cntv*a+cnt*b+cnto*a+b;
   cout<<max(sum,mus);
}
int main(){
    IOS;
    ll t=1;
    cin>>t;
    while(t--)
     {
        solve();
        cout<<"\n";
     }
	return 0;
}