#include <bits/stdc++.h>
using namespace std;
const int N = 5000 + 10;
int main() {
  int t;
  cin >> t;
  int n;
  while (t--) {
    cin >> n;
    int h, c0, c1;
    cin >> c0 >> c1 >> h;
    string str;
    cin >> str;
    int cnt0 = 0, cnt1 = 0;
    for (int i = 0; i < n; i++) {
      if (str[i] == '0')
        cnt0++;
      else
        cnt1++;
    }
    if (c0 <= c1) {
      if (c1 - c0 > h) {
        cout << n * c0 + cnt1 * h << endl;
      } else
        cout << cnt1 * c1 + cnt0 * c0 << endl;
    } else {
      if (c0 - c1 > h) {
        cout << n * c1 + cnt0 * h << endl;
      } else
        cout << cnt1 * c1 + cnt0 * c0 << endl;
    }
  }
  return 0;
}
