#include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for (ll i = a; i < b; i++)
#define yes cout << "YES\n";
#define no cout << "NO\n";
typedef long long int ll;
#define revfr(i, s, e) for (ll i = s - 1; i >= e; i--)
const ll mod = 1e9 + 7;
typedef vector<ll> vll;
#define all(x) x.begin(), x.end()
#define present(c, key) (find(all(c), key) != c.end())
#define tr(c, it) for (auto it : c)
#define getv(v, n)  for (ll i = 0; i < n; i++) cin >> v[i];
ll power(int x, int y)
{
    if (y == 0)
        return 1;
    else if (y % 2 == 0)
        return power(x, y / 2) * power(x, y / 2);
    else
        return x * power(x, y / 2) * power(x, y / 2);
}
void solv()
{
    ll n, a, b, zero, one;
    cin >> n >> a >> b;
    string s;
    cin >> s;
    zero = one = 0;
    if(s[0]=='0') 
    zero++; 
    else one++;
    rep(i,1,n)
    {
        if(s[i]==s[i-1]) continue;
        if(s[i]=='0') zero++; else one++;
    }
    ll ans = 0;
    if (b > 0)
        ans = (a + b) * n;
    else
    {
        ll mini=min(zero,one);
        ans=(mini+1)*b + a*n;
    }
    cout << ans << "\n";
}
int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int t;
    cin >> t;
    while (t--)
    {
        solv();
    }
    return 0;
}