#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n, c, c1, h;
    cin >> n >> c >> c1 >> h;
    string s;
    cin >> s;
    long long k1 = count(s.begin(), s.end(), '0');
    long long k2 = count(s.begin(), s.end(), '1');
    long long p1 = k1 * c;
    long long p2 = k2 * c1;
    long long p3 = p1 + p2;
    long long qq = n * c + h * k2;
    long long qp = n * c1 + h * k1;
    cout << min(min(p3, qq), qp) << "\n";
  }
}
