#include <bits/stdc++.h>
using namespace std;
int main() {
  int z;
  cin >> z;
  while (z--) {
    int N, c0, c1, H;
    cin >> N >> c0 >> c1 >> H;
    string s;
    cin >> s;
    int ct0 = 0;
    int ct1 = 0;
    for (int i = 0; i < s.size(); i++) {
      if (s[i] == '0') ct0++;
      if (s[i] == '1') ct1++;
    }
    if (c0 == c1) {
      cout << N * c0;
      cout << endl;
    } else {
      if (c0 < c1) {
        int t0 = (N * c0) + (ct1 * H);
        int t01 = (ct0 * c0) + (c1 * ct1);
        cout << min(t0, t01);
        cout << endl;
      } else {
        int t1 = (N * c1) + (ct0 * H);
        int t10 = (ct0 * c0) + (ct1 * c1);
        cout << min(t1, t10);
        cout << endl;
      }
    }
  }
  return 0;
}
