#include <bits/stdc++.h>
using namespace std;
double polyapothem(double n, double a) {
  return 1.0 * a / (2 * tan((180 / n) * 3.14159265358979323846 / 180));
}
void solve() {
  double a = 1, n;
  cin >> n;
  cout << setprecision(10) << 2 * polyapothem(2 * n, a) << endl;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
