#pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include #include using namespace std; typedef long double ld; ld t[500010],pi = acos(-1),si[500010],co[500010]; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); cout.precision(20); int i,n; ld l; cin >> n >> l; for(i=0;i> t[i]; si[i] = sin(2*pi*t[i]/l); co[i] = cos(2*pi*t[i]/l); } ld s = 0,c = 0,ans = 0; ld ans2 = 0; for(i=n - 1;i>=0;i--){ ans += ld(n + 2*i)*(s*co[i] - c*si[i]); s += si[i]; c += co[i]; } s = 0; c = 0; for(i=0;i