#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t;
  cin >> t;
  long long n;
  while (t--) {
    cin >> n;
    cout << setprecision(10);
    double ans = 1.0;
    double angle = (1.0) * (3.14159265358979323846 / n) / 2;
    ans = ans * (0.5) / (tan(angle));
    cout << 2 * ans << endl;
  }
}
