#include
int main()
{
int m,n;
double s,y,i,j,k;
while(scanf("%d",&m)!=EOF)
{
for(i=0;i<m;i++)
{s=0.0;
k=1;
scanf("%d",&n);
for(j=1;j<=n;j++)
{
y=k/j;
s+=y;
k=-k;
}
printf("%.2lf
",s);
}
}
return 0;
}
#include
int main()
{
int m,n;
double s,y,i,j,k;
while(scanf("%d",&m)!=EOF)
{
for(i=0;i<m;i++)
{s=0.0;
k=1;
scanf("%d",&n);
for(j=1;j<=n;j++)
{
y=k/j;
s+=y;
k=-k;
}
printf("%.2lf
",s);
}
}
return 0;
}