1.

/**
* ACM Training, SS09
* ACM Problem #557 Burger
* Link: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=7&page=show_problem&problem=498

* @author Doina Logofatu
* @version 1.0, 12/23/2009
*
* Method: Math, Probability
* Status : Accepted
* Runtime: 0.052
*/

#include <iostream>
#include <vector>

const int NMAX = 50000;
using namespace std;

int main(){
long int n, i, k;
vector<long double> T;
T.push_back(1);
for(i=1; i<=NMAX; i++){
T.push_back((long double)((2*i-1.0)/(2*i)*T[i-1]));
}
cin>>n;
for(i=0; i<n; i++){
cin >> k;
cout.precision(4);
cout.flags(ios::fixed);
cout << 1-T[k/2-1] << endl;
}
return 0;
}