#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    for (int i = 0; i < n; ++i) {
      int m, c0, c1, h;
      int num1, num0;
      num1 = num0 = 0;
      string str;
      cin >> m >> c0 >> c1 >> h;
      cin >> str;
      if (c0 + h < c1) {
        for (int j = 0; j < m; ++j) {
          if (str[j] == '1') {
            num1++;
          }
        }
        cout << num1 * (c0 + h) + (m - num1) * c0 << endl;
      } else if (c1 + h < c0) {
        for (int j = 0; j < m; ++j) {
          if (str[j] == '0') {
            num0++;
          }
        }
        cout << num0 * (c1 + h) + (m - num0) * c1 << endl;
      } else {
        for (int j = 0; j < m; ++j) {
          if (str[j] == '0') {
            num0++;
          }
        }
        cout << num0 * c0 + (m - num0) * c1 << endl;
      }
    }
  }
  return 0;
}
