#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, c0, c1, h;
    cin >> n >> c0 >> c1 >> h;
    string s;
    cin >> s;
    int sizes = s.size();
    int one = 0;
    int zero = 0;
    for (int i = 0; i < sizes; i++) {
      if (s[i] == '1') {
        one++;
      } else {
        zero++;
      }
    }
    int amt = 0;
    if (c0 < c1) {
      amt = n * c0 + one * h;
    } else {
      amt = n * c1 + zero * h;
    }
    int amt1 = zero * c0 + one * c1;
    if (amt1 < amt) {
      cout << amt1 << endl;
    } else {
      cout << amt << endl;
    }
  }
  return 0;
}
