#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long power(long long a, long long b, long long modi) {
  long long res = 1;
  while (b) {
    if (b % 2) {
      res = (res * a) % modi;
    }
    b /= 2;
    a = (a * a) % modi;
  }
  return res;
}
long long vis[200005], n, m, k, q;
long long res, ans, cur, total, val;
long long dx[] = {0, 0, 1, 1};
long long dy[] = {0, 1, 0, 1};
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long n, a, b;
    cin >> n >> a >> b;
    long long m = n;
    for (long long i = 0; i < n; i++) vis[i] = 0;
    string s;
    vector<long long> vt;
    cin >> s;
    long long i = 0;
    while (i < n) {
      long long j = i;
      while (j < n && s[i] == s[j]) {
        j++;
      }
      vt.push_back(j - i);
      i = j;
    }
    if (vt.size() == 1) {
      ans = n * a;
      ans += (n + 1ll) * b;
      cout << ans << "\n";
      continue;
    }
    n = vt.size();
    ans = 0;
    ans += 2ll * a;
    vt[1]++;
    for (long long i = 1; i < n - 1; i += 2) vis[i] = 1;
    for (long long i = 2; i < n - 1; i += 2) {
      vt[i]--;
      vt[i + 1]++;
      if (vt[i] == 0) {
        vis[i] = 1;
      } else {
        long long c1 = b * vt[i];
        long long c2 = 2ll * a;
        if (c1 > c2)
          ans += 2ll * a;
        else
          vis[i] = 1;
      }
    }
    for (long long i = 0; i < n; i++) {
      if (vis[i]) {
        ans += 2ll * b * vt[i];
      } else {
        ans += b * vt[i];
      }
    }
    ans += a * m;
    cout << ans << "\n";
  }
  return 0;
}
