#include using namespace std; int T,x,i,j,k; double f[401][5]; double get(int x) { if(x>=95)return 4.3; if(x>=90)return 4.0; if(x>=85)return 3.7; if(x>=80)return 3.3; if(x>=75)return 3.0; if(x>=70)return 2.7; if(x>=67)return 2.3; if(x>=65)return 2.0; if(x>=62)return 1.7; if(x>=60)return 1.0; return 0; } main() { cin>>T; for(i=0;i<=400;i++)for(k=0;k<4;k++)for(j=0;i+j<=400;j++)f[i+j][k+1]=max(f[i+j][k+1],f[i][k]+get(j)); while(T--) { cin>>x; printf("%.1f\n",f[x][4]); } }