The sample input I gave is : [[0,0],[1,0],[2,0],[1,0]]

The output provided by the system was 12. Manually I could only calculate 8. Also, my algo returned 8 as well.

Am I missing something or is the answer given by the system wrong?

Here's my code

```
public int numberOfBoomerangs(int[][] points) {
int count = 0;
for(int i=0;i<points.length;i++){
HashMap<Double,Integer> s= new HashMap<>();
for(int j = 0;j<points.length;j++){
if(i == j) continue;
double d = getDistance(points[i],points[j]);
if(s.containsKey(d)){
int get = s.get(d);
count = count + 2*get;
s.put(d,get+1);
}
else
s.put(d,1);
}
}
return count;
}
public double getDistance(int[] a, int[] b){
int x = a[0] - b[0];
x = x*x;
int y = a[1] - b[1];
y = y*y;
return Math.sqrt(x+y);
}
```