#include <bits/stdc++.h>
using namespace std;
using ll = long long;
string s;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int i, j, k, n, m, T;
  cin >> T;
  while (T--) {
    int c0, n0 = 0, n1 = 0, c1, h;
    cin >> n >> c0 >> c1 >> h >> s;
    for (i = 0; i < n; i++)
      if (s[i] == '0')
        n0++;
      else
        n1++;
    cout << min(n0 * c0 + n1 * c1, min(n0 * h + n * c1, n1 * h + n * c0))
         << endl;
  }
  return 0;
}
