#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1);
const double eps = 1e-9;
const int inf = 2000000000;
const long long infLL = 9000000000000000000;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int tc;
  cin >> tc;
  while (tc--) {
    int n, a, b, c;
    cin >> n >> a >> b >> c;
    string second;
    cin >> second;
    long long sum1 = 0, sum2 = 0, sum3 = 0;
    for (int i = 0; i < second.size(); i++) {
      if (second[i] == '0')
        sum1 += a;
      else if (second[i] == '1')
        sum1 += b;
    }
    int d = 0;
    for (int i = 0; i < second.size(); i++)
      if (second[i] == '1') d++;
    sum2 = (c * d) + (n * a);
    int e = 0;
    for (int i = 0; i < second.size(); i++)
      if (second[i] == '0') e++;
    sum3 = (c * e) + (n * b);
    cout << min(min(sum1, sum2), sum3) << '\n';
  }
  return 0;
}
