#include<bits/stdc++.h>
using namespace std;
#define int long long
#define FOR(I,v,b) for(int I=v;I<b;I++)
#define FORit(it,v) for(auto it=v.begin();it!=v.end();it++)
#define ROF(I,v,b) for(int I=v;I>=b;I--)
#define vec vector
#define vi vec<int>
#define pb push_back
#define pp pop_back
#define all(x) x.begin(),x.end()
#define testcases int tc;cin>>tc;while(tc--)
#define mem(v,k) memset(v,k,sizeof(v))
#define FF first
#define SS second
#define rt return
#define br break
#define ct continue
#define endl "\n"
#define ii pair<int,int>
#define vecin(v,n,index) for(int I=index;I<n;I++)cin>>v[I];
#define vecout(v,n,index) for(int I=index;I<n;I++)cout<<v[I]<<" ";cout<<endl;

void solve() {
    int n, a, b;
    cin >> n >> a >> b;
    string s;
    cin >> s;
    // string is empty in the end;
    int ans = 0 ;
    if (a >= 0 && b >= 0) {
        ans = n * (a + b);
        cout << ans << endl;
        rt;
    }
    else {
        ans = a * n;
        if (b >= 0) {
            ans += b * n;
            cout << ans << endl;
            rt;
        }
        else {
            // minimum group;
            int zero = 0, one = 0;
            s = "#" + s + "#";
            int i = 1;
            while (i <= n) {
                int j = i;
                while (s[j] == s[i])j++;
                if (s[i] == '1')one++;
                else zero++;
                i = j;
            }
            int m = min(one, zero) + 1;
            ans += (m * b);
            cout << ans << endl;
            rt;
        }
    }

}

signed main() {

#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    freopen("error.txt", "w", stderr);
#endif
    ios_base::sync_with_stdio(false);   cin.tie(NULL);  cout.tie(NULL);

    testcases
    solve();
}

