#include <bits/stdc++.h>
#define LL long long
#define ULL unsigned long long
#define pb push_back
#define st first
#define nd second
#define INF 0x3f3f3f3f
#define LINF 0x3f3f3f3f3f3f3f3f
template <class T> T read(T &a) {
    a=0;char x=getchar();bool f=0;
    for(;x<'0'||x>'9';x=getchar())f|=x=='-';
	for(;x>='0'&&x<='9';x=getchar())a=(a<<3)+(a<<1)+x-'0';
    if(f)a=-a;
    return a;
}
using namespace std;

char s[500];
int n, a, b;

int main() {
    int T;
    read(T);
    while (T--) {
        read(n), read(a), read(b);
        scanf("%s", s + 1);
        int ans = a * n;
        if (b >= 0) {
            printf("%d\n", ans + b * n);
            continue;
        }
        int cnta = 0, cntb = 0;
        for (int i = 1; i <= n; ++i) {
            if (s[i] != s[i - 1]) {
                if (s[i] == '1') cnta++;
                else cntb++;
            }
        }
        ans += (min(cnta, cntb) + 1) * b;
        printf("%d\n", ans);
    }
	return 0;
}

