#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n, c0, c1, h;
    cin >> n >> c0 >> c1 >> h;
    string s;
    cin >> s;
    int len0 = 0, len1 = 0;
    for (int i = 0; i < n; i++) {
      if (s[i] == '0')
        len0++;
      else
        len1++;
    }
    int cost = len0 * min(c0, c1 + h) + len1 * min(c1, c0 + h);
    cout << cost << "\n";
  }
  return 0;
}
