#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int n, c, d, h, i, s1, s2, s3, e = 0, f = 0;
    cin >> n >> c >> d >> h;
    string s;
    cin >> s;
    for (i = 0; i < n; i++) {
      if (s[i] == '0')
        e++;
      else
        f++;
    }
    s1 = n * c + f * h;
    s2 = n * d + e * h;
    s3 = e * c + f * d;
    cout << min(s3, min(s2, s1)) << "\n";
  }
}
