#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define rep(i,s,t) for(register int i=s;i<=t;++i) #define _rep(i,s,t) for(register int i=s;i>=t;--i) #define Rep(i,s,t) for(register int i=s;i #define ms(f,x) memset(f,x,sizeof f) #define mc(f,x) memcpy(f,x,sizeof f) #define open(x) freopen(#x".in","r",stdin),freopen(#x".out","w",stdout) #define gi(x) read(x) #define gii(x,y) read(x),read(y) #define giii(x,y,z) read(x),read(y),read(z) namespace IO{ #define gc getchar() #define pc(x) putchar(x) templateinline void read(T &x){ x=0;int f=1;char ch=gc;while(ch>'9'||ch<'0'){if(ch=='-')f=-1;ch=gc;} while(ch>='0'&&ch<='9')x=(x<<3)+(x<<1)+ch-'0',ch=gc;x*=f;return; } templateinline void write(T x=0){ T wr[51];wr[0]=0;if(x<0)pc('-'),x=-x;if(!x)pc(48); while(x)wr[++wr[0]]=x%10,x/=10;while(wr[0])pc(48+wr[wr[0]--]);return; } } using IO::read; using IO::write; typedef long long ll; typedef double db; typedef long double ld; typedef unsigned long long ull; using namespace std; const int N=1e6+11; double f[N]; int n,m,T; double deal(int x){ if(x<=59)return 0.0; if(x<=61)return 1.0; if(x<=64)return 1.7; if(x<=66)return 2.0; if(x<=69)return 2.3; if(x<=74)return 2.7; if(x<=79)return 3.0; if(x<=84)return 3.3; if(x<=89)return 3.7; if(x<=94)return 4.0; if(x<=100)return 4.3; } int main(){ rep(i,0,100) rep(j,i,100) rep(k,j,100) rep(l,k,100) f[i+j+k+l]=max(f[i+j+k+l],deal(i)+deal(j)+deal(k)+deal(l)); gi(T); while(T--){ gi(n); printf("%.1f\n",f[n]); } return 0; }