
/*          IT IS GOING TO HAPPEN !
                because
                 I AM GOING TO MAKE IT HAPPEN !      */


// all you need is to be consistent , even in your darkest times

// あきらめない -- Uzumaki Naruto !

// When something is important enough, you do it even if the odds are not in your favor.

#include "bits/stdc++.h"

#define DIEHOD ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define ld long double
#define ll long long
#define all(A) begin(A) , end(A)
#define sf(x)  scanf("%d",&x)
#define sfl(x) scanf("%lld",&x)
#define REP(i , n) for (int i = 0; i < n; i++)
#define pf(x)  printf("%d\n",x)
#define pfl(x) printf("%lld\n",x)
#define pii    pair<lld , lld>
#define rep(i , a , b)  for(lld i = a; i < b ; i++)
#define reps(i , a , b) for(lld i = a ; i >= b ; i--)
#define ftc(x)  cerr << #x << ": " << x << " \n" ;
#define vvi   vector < pair <lld , lld> >
#define lcm(a,b) ((a*b)/__gcd(a,b))
#define mem(a , b) memset(a , b , sizeof(a))
#define lld long long int
#define ulld unsigned long long int
#define input lld* arr = new lld [n]
#define input1 lld* brr = new lld [n]
#define vec vector < lld >
#define pb push_back
#define ss second
#define ff first
#define inf (lld)(1e18)
#define fin -999999999999999999
#define mod 1000000007
#define umap unordered_map
#define mpp make_pair
#define finish(x) cout << x << " ";
#define tolower(s)   std::transform(s.begin(), s.end(), s.begin(),[](unsigned char c){ return std::tolower(c); });

using namespace std;

// map <lld , vector<lld>> g;
// vec v;
// map<lld , bool> vis ; lld siz = 0 , ans = 0 ;

// void dfs(lld x) {

//   vis[x] = 1;

//   for (auto i : g[x]) {
//     if (!vis[i]) {
//       dfs(i);
//     }
//   }

//   return;
// }

// lld pow1(int  a , int y) {
//   a %= mod;
//   lld  ans = 1;

//   while (y > 0) {

//     if (y & 1)
//       ans = (ans * a) % mod;

//     y = y >> 1;
//     a = (a * a) % mod;
//   }
//   return ans;
// }

// lld power(int a, int b) {
//   lld ans = 1;
//   while (b > 0) {
//     if (b & 1) ans = ans * a;
//     b = b >> 1;
//     a = a * a;
//   }
//   return ans;
// }

// bool isPrime(lld n) {
//   if (n <= 1)  return false;
//   if (n <= 3)  return true;
//   if (n % 2 == 0 || n % 3 == 0) return false;

//   lld p = sqrt(n);

//   for (lld i = 5; i <= p ; i = i + 6)
//     if (n % i == 0 || n % (i + 2) == 0)
//       return false;
//   return true;
// }

// bool sortbysec(const pair<lld , lld > &a, const pair<lld , lld > &b) {
//   return (a.ss < b.ss);
// }



// Do SMTH instead of sitting mofo

// BINARY SEARCH zarur dekh lena (kaafi useful)

// String ka question hai to y zarur dekh lena kahi Dsu ya Graph se solve ho jae
// ya fir STACK se bhi ho sakta hai ...

// CONSTRUCTIVE ALGOS ke case mai pattern ke alava brute force bhi karke dekh lena
// jese digits hai to ek extra 0 se 9 tk ka ya agar character hai to ek 'a' se 'z' tak
// for loop laga kar check karo ki kahi
// ek particular X mil jae jo pattern crack kar de....

// also ODD EVEN ka pattern Zarur Check kar lena
// Especially jaha ai divides ai + 1 jese conditions ho
// to ek ko one rakh kar next ko odd ya even karke dekh lo


// keep in mind apna best dena ki zarurat tabhi sabse zada hoti hai
// jab aap sabse zada kharab state mai ho tabhi kuch hoga

// BHAI  .... DP with recurrance contest 672 nuksaan ho gaya tha dp na soch kar




void sober() {
    lld n , x = 0 , a = 0 , b = 0 , y = 0 , sum = 0 , k = 0 , m = 0 , c = 0 , d = 0;

    string s;

    cin >> n >> a >> b >> s;

    if (b >= 0) {
        cout << (a + b) * n << "\n"; return;
    }

    lld zero = 0, one = 0;

    // REP(i, n) x += s[i] == '0', y += s[i] == '1';

    // jiske segments kam hai unhe phle uda do;

    char prev = s[0]; lld temp = 0;

    vector <pair<char, lld>> v;

    REP(i, n) {

        zero += s[i] == '0';
        one += s[i] == '1';
    }

    REP(i, n) {

        // cout << "hello\n";

        if (s[i] == prev) {

            temp++;

        } else {

            v.pb({prev, temp});
            temp = 0;
            prev = s[i];
            i--;
        }

    }

    if (temp) {
        v.pb({prev, temp});
    }

    for (auto &it : v) {
        if (it.ff == '1') {
            x++;
        } else {
            y++;
        }
    }

    lld ans = 0;

    // cout << x << " " << y << "  " <<  zero << "  " << one << "\n";

    if (min(x, y) == x) {

        // 1

        ans = one * a + x * b;

        ans += zero * a + b;

    } else {

        ans = zero * a + y * b;

        ans += one * a + b;

    }

    cout << ans << "\n"; return;

}

signed main() {

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

    DIEHOD;
    lld t = 1;
    cin >> t;
    while (t--) {
        sober();
    }
}

//  c0ded by :
// - - - - - - - - - - - - - - - - - - - - - - s 0 b e r and s i m r a n


