func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, a[2005];   long long sum[10005], D[5005];   int main() {     scanf( %d , &n);     for (int i = 1; i <= n; i++) scanf( %d , &a[i]);     for (int i = 1; i <= n; i++)       for (int j = i + 1; j <= n; j++) D[abs(a[i] - a[j])]++;     sum[5000] = 0;     double ans = 0;     for (int i = 4999; i >= 0; i--) sum[i] = sum[i + 1] + D[i];     for (int i = 1; i <= 5000; i++)       for (int j = 1; i + j <= 5000; j++) ans += D[i] * D[j] * sum[i + j + 1];     double match = n * (n - 1) / 2.0;     printf( %.10lf n , ans / match / match / match);   }   