Lapindrom prob please help I am new to codechef

why wrong answer is giving even if i am getting expected outputs on every test cases For Lapindrom problem?

Code :LAPIN

/* package codechef; // don’t place package name! */

import java.util.;
import java.lang.
;
import java.io.*;

/* Name of the class has to be “Main” only if the class is public. */
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
// your code goes here
String S=“”, S1=“”,S2=“”;
int n=0;
Scanner sc = new Scanner(System.in);
n = sc.nextInt();

	for(int i=1;i<=n ;i++)
	{
	S = sc.next();
    S1 = S.substring(0,S.length()/2);
        if(S.length()%2 == 0)
        S2 = S.substring(S.length()/2,S.length());
        else
        S2 = S.substring(S.length()/2 + 1,S.length());
   if(calAscii(S1) == calAscii(S2))
   System.out.println("Yes");
   else
   System.out.println("No");
   
   }

}
static int calAscii(String S)
{
    int sum =0;
    for(int i =0 ;i<S.length();i++)
    {
        sum += S.codePointAt(i);
    }
    return sum ;
}

}

This is because getting all the test cases doesn’t mean your logic for the program is correct or its implementation. As I can see the logic itself is not totally correct so it is getting WA on submitting.

Thankyou I got it