//优化#pragma GCC optimize(2)//C#include<string.h>#include<stdio.h>#include<stdlib.h>#include<math.h>//C++//#include<unordered_map>#include<algorithm>#include<iostream>#include<istream>#include<iomanip>#include<climits>#include<cstdio>#include<string>#include<vector>#include<cmath>#include<queue>#include<stack>#include<map>#include<set>//宏定义#define N 2010#define DoIdo main//#define scanf scanf_s#define it set<ll>::iterator//定义+命名空间typedeflonglong ll;typedefunsignedlonglong ull;const ll mod =998244353;const ll INF =1e18;constint maxn =5e6+10;usingnamespace std;//全局变量constdouble pi =acos(-1);//函数区
ll max(ll a, ll b){return a > b ? a : b;}
ll min(ll a, ll b){return a < b ? a : b;}//主函数intDoIdo(){/*ios::sync_with_stdio(false);
cin.tie(NULL), cout.tie(NULL);*/int T;
cin >> T;while(T--){int n;
cin >> n;double du =360.000/(double)(2* n);
du = du /180* pi;double ans =tan(du /2.00);printf("%.10lf\n",1/ ans);}return0;}//分割线---------------------------------QWQ/*
*/