#include inline int read(){ int x=0,w=1; char ch=0; while (ch<'0' || ch>'9'){ ch=getchar(); if (ch=='-') w=-1; } while (ch<='9' && ch>='0'){ x=(x<<1)+(x<<3)+ch-'0'; ch=getchar(); } return x*w; } using namespace std; typedef long long ll; const int N=1e5+5; double dp[N]; inline double calc(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; } int main(){ for (int i=0;i<=100;++i) for (int j=i;j<=100;++j) for (int k=j;k<=100;++k) for (int t=k;t<=100;++t) dp[i+j+k+t]=max(dp[i+j+k+t],calc(i)+calc(j)+calc(k)+calc(t)); int T=read(); while (T--){ int x=read(); printf("%.1lf\n",dp[x]); } return 0; }