#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, T;
  cin >> T;
  int b[T];
  int k;
  for (i = 0; i < T; i++) {
    int n, c0, c1, h, j;
    cin >> n >> c0 >> c1 >> h;
    string str;
    cin >> str;
    int cost = 0;
    int cnt0 = 0, cnt1 = 0;
    int cost0 = 0, cost1 = 0;
    for (j = 0; j < n; j++) {
      if (str[j] == '0') {
        cnt0 = cnt0 + 1;
        cost = cost + c0;
      } else if (str[j] == '1') {
        cnt1 = cnt1 + 1;
        cost = cost + c1;
      }
    }
    cost0 = cnt0 * h + n * c1;
    cost1 = cnt1 * h + n * c0;
    int mn = min(cost, min(cost0, cost1));
    cout << mn << endl;
  }
  return 0;
}
