#include using namespace std; int res[405],a[101]; inline int go(int x) { int ret=0; for (int i=0;i<=x&&i<=100;++i) for (int j=0;i+j<=x&&j<=100;++j) for (int k=0;i+j+k<=x&&k<=100;++k) { int l=x-i-j-k; if (l>100) continue; ret=max(ret,a[i]+a[j]+a[k]+a[l]); } return ret; } int main() { for (int i=0;i<=100;++i) { if (i<=59) a[i]=0; else if (i<=61) a[i]=10; else if (i<=64) a[i]=17; else if (i<=66) a[i]=20; else if (i<=69) a[i]=23; else if (i<=74) a[i]=27; else if (i<=79) a[i]=30; else if (i<=84) a[i]=33; else if (i<=89) a[i]=37; else if (i<=94) a[i]=40; else a[i]=43; } for (int i=0;i<=400;++i) res[i]=go(i); int cas;cin>>cas; while (cas--) { int x;cin>>x; printf("%d.%d\n",res[x]/10,res[x]%10); } return 0; }