#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
void cp() {
  double n;
  cin >> n;
  n = n * 2.0;
  double x = 1.0 / 2.0 / sin(PI / (2 * n));
  cout << fixed << setprecision(10) << x << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int t;
  t = 1;
  cin >> t;
  while (t--) {
    cp();
  }
  return 0;
}
