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

void solve()
{ 
    int n,a,b;
    cin >> n >> a >> b;
    string s;
    cin >> s;
    vector<int> v(2,0);
    v[s[0] - '0'] = 1;
    for(int i=1;i<n;i++)
    {
        if(s[i] != s[i - 1]) v[s[i] - '0']++;
    }
    int ans = n * a;
    if(b >= 0) ans += b * n;
    else ans += b * (min(v[0],v[1]) + 1);
    cout << ans << endl;
}
int main()
{
    int t;
    cin >> t;
    while(t--) solve();
}

  