#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    double n;
    cin >> n;
    n = n + 0.0;
    n = n * 2.000;
    double ans = 1.00 / tan(0.01745329252 * 180 / n);
    cout << fixed << setprecision(9) << ans << endl;
  }
}
