#include <stdio.h>
#include <string.h>


int main()
{
     int x, y, z, i, j, k, a, b, c, n, m, t, sum;
     char s[110];
     
     scanf("%d",&t);
     while(t--)
     {
          scanf("%d %d %d",&n,&a,&b);
          scanf("%s",s);
          
          c = 1;
          i = s[x] - '0';
          for(x = 1; x < n; x++)
                if(s[x] != s[x-1])
                   c++;
                   
          if(b > 0)
            printf("%d\n",n * (a + b));
          else  
            printf("%d\n",n * a + (c + 2) / 2 * b);
     }
     return 0;
}
