Please please anyone help me with this problem

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

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

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

			count++;
		}
		
	}
	
	int p=count*(count+1)/2;
	cout<<p<<endl;
	
}

return 0;
}

thanks in advance

Define p as long long you will get AC !!
int p=count*(count+1)/2;===> long long p=count*(count+1)/2;
https://www.codechef.com/viewsolution/32020560