#include<bits/stdc++.h>
using namespace std;
int main ()
{
   int t;
   cin >> t;

  while( t-- )
    {
       int n, a, b, i, count = 1;
       cin >> n >> a >> b;
       string s;
       cin >> s;

       for(i = 1; i < n; i++)
         count += s[i] != s[i - 1];
         count/=2;

      if(b < 0)
        cout << n*a + (count + 1)*b << endl;
      else
        cout << n*a + n*b << endl;      


    }


    return 0;
}
