#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    n = n * 2;
    double ans;
    ans = (1) / (tan(3.1415926535 / n));
    cout << fixed << setprecision(10) << ans << "\n";
  }
}
