#include <bits/stdc++.h>
using namespace std;

#define fi first
#define se second

typedef long long ll;
typedef pair<ll,ll> ii;

const ll INF = 1e18;
ll tc, n, a, b;

int main() {
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    cin >> tc;
    while (tc--) {
        cin >> n >> a >> b;
        vector<ii> v;
        ll cnt[2] = {0,0};
        for (int i = 1; i <= n; i++) {
            char c; cin >> c;
            int x = c-'0';
            if (v.empty() || v.back().fi != x) {
                cnt[x]++;
                v.push_back({x,0});
            }
            v.back().se++; 
        }
        ll ans = n*(a+b);
        for (int i : {0,1}) {
            ll cost = cnt[i] + (cnt[i^1] > 0);
            ans = max(ans,n*a+cost*b);
        }
        cout << ans << '\n';
    }
    return 0;
}