#include <bits/stdc++.h>
using namespace std;
double pi = M_PI;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    n = n * 2;
    double angle = ((n - 2) * M_PI) / (2 * n);
    cout << fixed << setprecision(9) << tan(angle);
    cout << "\n";
  }
}
