#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 zero = 0, one = 0;
    for (int(i) = (0); (i) < (n); (i)++) {
      zero += (s[i] == '0');
      one += (s[i] == '1');
    }
    int ans = (zero * c0 + one * c1);
    ans = min(ans, zero * h + n * c1);
    ans = min(ans, one * h + n * c0);
    cout << ans << endl;
  }
  return 0;
}
