/********************************************************************* Problem:1002 Author:hydd Date: *********************************************************************/ #include #include #define File(x) freopen(x".in","r",stdin);freopen(x".out","w",stdout); using namespace std; const int pos[11]={0,60,62,65,67,70,75,80,85,90,95}; const int val[11]={0,10,17,20,23,27,30,33,37,40,43}; int T,x; int main(){ scanf("%d",&T); while (T--){ scanf("%d",&x); int ans=0; for (int i=0;i<=10;i++) for (int j=0;j<=10;j++) for (int k=0;k<=10;k++) for (int l=0;l<=10;l++) if (x>=pos[i]+pos[j]+pos[k]+pos[l]) ans=max(ans,val[i]+val[j]+val[k]+val[l]); printf("%d.%d\n",ans/10,ans%10); } return 0; }