#include #define LL long long #define Max(a,b) ((ab)&&(a=b)) #define rep(i,a,b) for(int i=a,i##end=b;i<=i##end;++i) #define drep(i,a,b) for(int i=a,i##end=b;i>=i##end;--i) #define erep(i,a) for(int i=hd[a],y;(y=to[i]);i=nxt[i]) using namespace std; char C; inline int rd() { int res=0,f=1; while(C=getchar(),C<48||C>57)if(C=='-')f=0; do res=(res<<3)+(res<<1)+(C^48); while(C=getchar(),C>=48&&C<=57); if(f)return res; return -res; } double pt[202],dp[401]; void init(){ rep(i,60,61)pt[i]=1.0; rep(i,62,64)pt[i]=1.7; rep(i,65,66)pt[i]=2.0; rep(i,67,69)pt[i]=2.3; rep(i,70,74)pt[i]=2.7; rep(i,75,79)pt[i]=3.0; rep(i,80,84)pt[i]=3.3; rep(i,85,89)pt[i]=3.7; rep(i,90,94)pt[i]=4.0; rep(i,95,100)pt[i]=4.3; } int main() { int T=rd(); init(); while(T--){ int n=rd(); rep(i,0,n)dp[i]=0; rep(k,1,4)drep(i,n,0)rep(j,0,100) if(i>=j)Max(dp[i],dp[i-j]+pt[j]); printf("%.1lf\n",dp[n]); } }