#include #define clr(x) memset(x,0,sizeof(x)) #define clrmax(x) memset(x,0x3f3f3f3f,sizeof(x)) #define clrmin(x) memset(x,-0x3f3f3f3f,sizeof(x)) #define pb push_back #define LL long long #define mod 1000000007 #define mp make_pair using namespace std; typedef pair pii; const int N = 1e2+10; const int M = 1e6+10; int T,n,m,k,s; int score[] = {0,59,60,61,62,64,65,66,67,69,70,74,75,79,80,84,85,89,90,94,95,100}; double gpa[] = {0,0,1.0,1.0,1.7,1.7,2.0,2.0,2.3,2.3,2.7,2.7,3.0,3.0,3.3,3.3,3.7,3.7,4.0,4.0,4.3,4.3}; double ans; void dfs(double now,int lf,int km){ if(lf < 0) return ; if(km == 4){ if(lf > 100) return ; now += gpa[lower_bound(score,score + 22,lf) - score]; ans = max(ans,now); return ; } for(int i=0;i<22;i++){ dfs(now + gpa[i],lf - score[i],km + 1); } return ; } int main(){ scanf("%d",&T); while(T--){ scanf("%d",&n); ans = 0; dfs(0,n,1); printf("%.1f\n",ans); } return 0; }