//bismillahir rahmanir rahim
#include<bits/stdc++.h>
#include<iostream>
 
 
using namespace std;
void build();
#define ll              long long
#define ULL             unsigned long long
#define ff              first
#define ss              second
#define pb              push_back
#define PI              acos(-1.0)
#define mk              make_pair
#define pii             pair<int,int>
#define pll             pair<LL,LL>
#define min3(a,b,c)     min(a,min(b,c))
#define max3(a,b,c)     max(a,max(b,c))
#define min4(a,b,c,d)   min(a,min(b,min(c,d)))
#define max4(a,b,c,d)   max(a,max(b,max(c,d)))
#define SQR(a)          ((a)*(a))
#define fr2(i,a,b)      for(int i=a;i<=b;i++)
#define rf(i,a,b)      for(int i=a;i>=b;i--)
#define fr(i,b)        for(int i=0;i<b;i++)
#define MEM(a,x)        memset(a,x,sizeof(a))
#define ABS(x)          ((x)<0?-(x):(x))
#define all(v)          v.begin(),v.end()
#define srt(v)         sort(v.begin(),v.end())
#define rv(v)          reverse(v.begin(),v.end())
#define fast           ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
const int M=200005;
const int mod=1e9+7;

//bismillahir rahmanir rahim

void solve(){
    int n,a,b;
    cin>>n>>a>>b;
    string s;
    cin>>s;
    vector<int>v1,v2;
    int res=a*n;
    if(b>0){
        res+=b*n;
        cout<<res<<endl;
        return;
    }
    int t0=0,t1=0;
    for(int i=0;i<s.size();){
        if(s[i]=='0'){
            t0++;
            while(s[i]=='0'){
                i++;
            }
        }
        if(s[i]=='1'){
            t1++;
            while(s[i]=='1'){
                i++;
            }
        }
    }
    //cout<<t1<<" "<<t0<<endl;
    res+=(min(t1,t0)+1)*b;
    cout<<res<<endl;
}
int main(){
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    fast
   // MEM(dp,-1);
    int t=1;
    cin>>t;
    int cse=0;
    while(t--){
        solve();
    }
    return 0;
}