#include <bits/stdc++.h>
using namespace std;
void solve() {
  double n;
  cin >> n;
  n = 2.000000 * n;
  double a =
      1.000000 / (2.000000 * tan((180.000000 / n) * 3.14159265 / 180.000000));
  cout << setprecision(10) << a * 2.000000 << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
}
