I am getting erron in test cases can any one help me

#include
#include
using namespace std;
int num(string s,int n,int x)
{
int sum=0;
for(int i=n;i<=x;i++)
{
int temp=s[i];
sum=sum+temp;
}
return sum;
}
int main()
{
int t;
cin>>t;
while(t–)
{
string s;
int l,s1,s2,x,y;
cin>>s;
l =s.length();
if(l%2==0)
{
x=l/2;
y=x;

        }
        else
        {
              x=(l/2);
              y=x+1;
        }
        s1=num(s,0,x-1);
        s2=num(s,y,l);
        if(s1==s2)
        {
              cout<<"YES"<<endl;
        }
        else
        {
              cout<<"NO"<<endl;
        }
  }

}

error : Solution: 52420227 | CodeChef
question : Contest Page | CodeChef

Consider the test input:

1
dbfdecfb
1 Like

thanks i got to know my mistake

1 Like