WA In CSUB

for this problem([CSUB Problem - CodeChef ]i am continuously getting wrong answer,

here is the code:-
#include<bits/stdc++.h>
using namespace std;

int main()
{
int t;
cin>>t;
while(t–)
{
int n;
cin>>n;
string s;
cin>>s;
int count=0,k=1,i;
for(i=n-1;i>=0;i–)
{
if(s[i]==‘1’)
{
count=count+k;
k++ ;

	   }
   	
   }
	
	cout<<count<<endl;
}
return 0;

}

thanks in advance

Firstly, please Format your code

Secondly, Count should be long long.