#include <bits/stdc++.h>
using namespace std;
int main() {
    ios::sync_with_stdio(0);
    int t, l, a, b;
    char input[128];
    cin >> t;
    while (t--) {
        cin >> l >> a >> b;
        if(l)
            cin >> input[1];
        char flag = input[1];
        int cnt[2];
        cnt[0] = cnt[1] = 0;
        for (int i = 2; i <= l; i++) {
            cin >> input[i];
            if (input[i] != flag) {
                cnt[flag - '0']++;
                flag = input[i];
            }
        }
        cnt[flag - '0']++;
        //cout << cnt[0] << cnt[1] <<    ' ';
        if (b > 0) {
            cout << (a + b) * l << endl;
        }
        else {
            cout << a * l + b * (min(cnt[0], cnt[1]) + 1) << endl; 
        }
    }
    return 0;
}