为啥我一直是67%
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc =new Scanner(System.in);
String str =sc.nextLine();
String str2 = str.replaceAll(" ", "");
String[] s=str2.split(",");
int[] ints = new int[s.length];
for(int i=0;i<s.length;i++){
ints[i] = Integer.parseInt(s[i]);
}
int count=0;
for(int i=0;i<ints.length-1;i++){
for(int j=i+1;j<ints.length;j++){
int k=ints[i]+ints[j];
if(k==0)
count++;
}
}
System.out.println(count);
}
}