#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <queue>
#include <deque>
#include <bitset>
#include <iterator>
#include <list>
#include <stack>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <functional>
#include <numeric>
#include <utility>
#include <limits>
#include <time.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <climits>
#include <bitset>
#include <iomanip> 
using namespace std;

#define fr first
#define sc second
#define pb push_back
#define MOD 1000000000+7
#define INF LLONG_MAX
#define NINF LLONG_MIN
#define len(x) x.size()
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))
#define foreach(it, l) for (auto it = l.begin(); it != l.end(); it++)
#define prDouble(x) cout<<fixed<<setprecision(10)<<x

typedef long double ld;
typedef long long ll;
typedef pair<ll,ll> pll;
typedef vector<ll> vll;

vll *adj;
bool *visited;

void solve() {
    string s;
    ll a,b,n;
    cin>>n>>a>>b;
    cin>>s;
    ll ans;
    if(b>=0) {
        ans = n*a+n*b;
    }

    else {
        ll chz=0;
        ll cho=0;
        char prev;
        for(ll i=0;i<n;i++) {
            if(i==0) {
                if(s[i]=='0') {
                    chz++;
                    prev = '0';
                }
                else {
                    cho++;
                    prev = '1';
                }
            }

            else {
                if(s[i]==prev) {
                    continue;
                }
                else {
                    if(s[i]=='0') {
                        chz++;
                        prev='0';
                    }
                    else {
                        cho++;
                        prev='1';
                    }
                }
            }
        }

        ll k = 1+min(chz,cho);

        ans = n*a+k*b;
    }

    cout<<ans<<endl;
}

int main() {
    
    #ifndef ONLINE_JUDGE
    freopen("../input.txt","r",stdin);
    //freopen("../output.txt","w",stdout);
    #endif

    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    ll t;
    cin>>t;
    //t=1;
    
    while(t--) {
        solve();
    }

    return 0;
}

