题意
https://www.cnblogs.com/2aptx4869/p/12907690.html
和C1题意一样, 但是 n 变为了奇数
题解
那么就不是4条边在正方形的边上了
当然, 这次的增长边就要通过不在对角线上的其他店扩展了
所以我们要通过(多边形的外接圆的)直径去求边长, 然后就是几何求解, 过程就不给了
#include <bits/stdc++.h>
#define all(n) (n).begin(), (n).end()
#define se second
#define fi first
#define pb push_back
#define mp make_pair
#define sqr(n) (n)*(n)
#define rep(i,a,b) for(int i=a;i<=b;++i)
#define per(i,a,b) for(int i=a;i>=b;--i)
using namespace std;
typedef long long ll;
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef double db;
const int N = 1e6 + 5;
int n, m, _, k;
int a[N];
int main()
{
//ios::sync_with_stdio(0); cin.tie(0);
double pi = 3.1415926535898;
for (cin >> _; _; --_)
{
cin >> n; n <<= 1;
printf("%.7lf\n", 0.5 / sin(pi / n) * cos(pi / n / 2) * 2);
}
return 0;
}