#include <bits/stdc++.h>
using namespace std;
int main() {
	//code
	int t;
	cin>>t;
	while(t--){
	    int n,a,b;
	    cin>>n;
	    cin>>a;
	    cin>>b;
	    cout<<endl;
	    string s;
	    cin>>s;
	    if(b==0)
	        cout<<a*n<<endl;
	    else if(b>0){
	        cout<<(a*n)+(b*n)<<endl;
	    }
	    else if(b<0){
	        int fincount=0;
	        int count1=0,count0=0;
	        for(int i=0;i<n;i++){
	            if(s[i]=='1' && s[i+1]!='1')
	            count1++;
	        }
	        for(int i=0;i<n;i++){
	            if(s[i]=='0' && s[i+1]!='0')
	            count0++;
	        }
	        fincount=min(count1,count0)+1;
	        cout<<(a*n)+(b*fincount)<<endl;
	        
	    }
	}
	return 0;
}