#include<bits/stdc++.h>
using namespace std;
int main()
{
    int tc;
    cin>>tc;
    while(tc--)
    {
        int n,a,b,i=0,l=0,l1=0,l2=0,c=0,c1=0,c2=0,p=0,ans=0;
        string s;
        cin>>n>>a>>b;
        cin>>s;

        ans = a*n;
       // cout<<l<<endl;

       if(b <= 0)
       {
           for(;i<n;)
           {
               if(s[i]=='0')
               {
                   while(s[i]!='1' && i<n)
                   {
                       l1++;
                       i++;
                   }
                   c1++;
               }
               else i++;
           }
           if(l1!=n)c1++;

           i=0;
           for(;i<n;)
           {
               if(s[i]=='1')
               {
                   while(s[i]!='0' && i<n)
                   {
                       l2++;
                       i++;
                   }
                   c2++;
               }
               else i++;
           }
           if(l2!=n)c2++;

           c = min(c1,c2);
           ans+=(b*c);
       }

       else{
        ans+=b*n;
       }

      cout<<ans<<endl;
    }
    return 0;
}
