#include<bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin>>t;
while(t–)
{
int n;
cin>>n;
string str;
cin>>str;
char char_array[n+1];
strcpy(char_array,str.c_str());
int m=0;
for(int j=0;char_array[j]!='\0';j++)
{
if(char_array[j]=='1')
{
m++;
}
}
cout<<m*(m+1)/2<<"\n";
}
}
what is the error in the code giving wrong answer’s for the test cases, base test case passed