#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int t;
  cin >> t;
  while (t--) {
    long long int n, a, b, h;
    cin >> n >> a >> b >> h;
    string s;
    cin >> s;
    long long int i;
    long long int one = 0, zero = 0;
    for (i = 0; i < n; i++) {
      one += (s[i] == '1');
      zero += (s[i] == '0');
    }
    long long int x = (zero * a) + (one * b);
    long long int zc = (zero * h);
    long long int y = (n * b) + zc;
    long long int oc = (one * h);
    long long int z = (n * a) + oc;
    long long int ans = min(x, min(y, z));
    cout << ans;
    cout << endl;
  }
  return 0;
}
