#include <bits/stdc++.h>
using namespace std;
const int INF = int(1e9 + 1);
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    long long n, a, b, x = 0, i, j = 0, p[200005], y = 0;
    string s;
    cin >> n >> a >> b >> s;
    x = a * n;
    x += b * (n + 1);
    p[0] = 0;
    for (i = 0; i < s.length(); i++) {
      if (s[i] == '1' && j % 2 == 0) {
        j++;
        p[j] = 0;
      }
      if (s[i] == '0' && j % 2 == 1) {
        j++;
        p[j] = 0;
      }
      p[j]++;
    }
    j++;
    p[j] = -1;
    for (i = 1; i != j && p[i + 1] != -1; i++) {
      if (i == 1) {
        x += a;
      }
      if (i % 2 == 1) {
        if (y == 0) {
          x += b;
          x += a;
        }
        x += b * (p[i]);
        y = 1;
      } else {
        if ((2 * a + b) < b * p[i]) {
          x += a;
          y = 0;
        } else {
          x += b * p[i];
          y = 1;
        }
      }
    }
    cout << x << endl;
  }
}
