#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 str;
    cin >> str;
    int count = 0, count1 = 0;
    for (int i = 0; i < str.length(); i++) {
      if (str[i] == '1')
        count1++;
      else
        count++;
    }
    int cost = 0, changeCost = 0;
    cost = (count * c0) + (count1 * c1);
    int co = (n * c0) + (count1 * h);
    int co1 = (n * c1) + (count * h);
    changeCost = co > co1 ? co1 : co;
    if (changeCost > cost)
      cout << cost << endl;
    else
      cout << changeCost << endl;
  }
}
