#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n, c0, c1, h;
    cin >> n >> c0 >> c1 >> h;
    string s;
    cin >> s;
    long long count0{0}, count1{0};
    long long ans1 = INT_MAX, ans2 = INT_MAX, ans3 = INT_MAX, ans4 = INT_MAX;
    for (long long i = 0; i < n; i++) {
      if (s[i] == '0')
        count0++;
      else
        count1++;
    }
    ans1 = min(count0 * c0 + count1 * c1, (n * c1) + count0 * h);
    ans2 = min(ans1, (n * c0) + count1 * h);
    cout << ans2 << endl;
  }
  return 0;
}
