#include <bits/stdc++.h>
using namespace std;
#define fo(i, n) for (i = 0; i < n; i++)
#define Fo(i, k, n) for (i = k; k < n ? i < n : i > n; k < n ? i += 1 : i -= 1)
#define ll long long
#define si(x) scanf("%d", &x)
#define sl(x) scanf("%lld", &x)
#define ss(s) scanf("%s", s)
#define pi(x) printf("%d\n", x)
#define pl(x) printf("%lld\n", x)
#define ps(s) printf("%s\n", s)
#define deb(x) cout << #x << "=" << x << endl
#define deb2(x, y) cout << #x << "=" << x << ", " << #y << "=" << y << endl
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define clr(x) memset(x, 0, sizeof(x))
#define sortall(x) sort(all(x))
#define tr(it, a) for (auto it = a.begin(); it != a.end(); it++)
#define PI 3.1415926535897932384626
#define M 1000000007
typedef pair<int, int> ii;
typedef pair<ll, ll> pl;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<ii> vii;

int main()
{
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    srand(chrono::high_resolution_clock::now().time_since_epoch().count());

    int t = 1, i;
    cin >> t;

    while (t--)
    {
        ll n, a, b, ans = 0;
        cin >> n >> a >> b;
        string s;
        cin >> s;

        if (b >= 0)
        {
            ans = s.length() * (a + b);
        }
        else
        {
            ll n1 = 0, n2 = 0, i = 0;
            while (s[i] == '0')
            {
                n1 = 1;
                i++;
            }
            for (ll j = i; j < n; j++)
            {
                if (s[j] == '0' && s[j] != s[j - 1])
                    n1++;
            }
            i = 0;
            while (s[i] == '1')
            {
                n2 = 1;
                i++;
            }
            for (ll j = i; j < n; j++)
            {
                if (s[j] == '1' && s[j] != s[j - 1])
                    n2++;
            }
            //cout << n1 << " " << n2 << endl;
            ans = s.length() * a;
            ans += (min(n1, n2) + 1) * b;
        }
        cout << ans << endl;
    }

    return 0;
}