#include using namespace std; int Tn; int a[100]={0,60,62,65,67,70,75,80,85,90,95}; double b[100]={0.0,1.0,1.7,2.0,2.3,2.7,3.0,3.3,3.7,4.0,4.3}; double f(double x){ for(int i=10;i>=0;--i){ if(x>=a[i])return b[i]; } return 0.0; } double g[209]; int main(){ scanf("%d",&Tn); for(int i=0;i<=200;++i){ for(int a=0;a<=100;++a){ int b=i-a; if(b<0||b>100)continue; g[i]=max(g[i],f(a)+f(b)); } } while(Tn--){ int sum;scanf("%d",&sum); double ans=0; for(int a=0;a<=200;++a){ int b=sum-a; if(b<0||b>200)continue; ans=max(ans,g[a]+g[b]); } printf("%.1f\n",ans); } return 0; }