/* * =template=.cpp * Copyright (C) 2017 hzw * * Distributed under terms of the MIT license. */ #include #include #include #include #include #include #include #include #include #include #include #define FR first #define SC second #define MP make_pair #define rep(i,a,b) for (int i=a;i<=b;i++) #define pb push_back #define ws wss using namespace std; typedef long long LL; typedef pair PII; template void upmax(T &a,T b) { if (a void upmin(T &a,T b) { if (a>b) a=b;} void read(int &x) { char ch;int fu=1; while ((ch=getchar())<=32); x=0; if (ch=='-') fu=-1;else x=ch-48; while ((ch=getchar())>32) x=x*10+ch-48; x*=fu; } const double pi=acos(-1); void upmax(int &a,int b) { if (ab) a=b;} //----------------------- const int N=500010; int n,cas, m; double s(int i) { if (i<=59) return 0; else if (i<=61) return 1; else if (i<=64) return 1.7; else if (i<=66) return 2; else if (i<=69) return 2.3; else if (i<=74) return 2.7; else if (i<=79) return 3; else if (i<=84) return 3.3; else if (i<=89) return 3.7; else if (i<=94) return 4; else if (i<=100) return 4.3; return 233; } int main() { scanf("%d", &cas); for (int ii=1;ii<=cas;ii++) { scanf("%d", &n); double ans=0; for (int i=0;i<=100&&i<=n;i++) for (int j=i;j<=100&&i+j<=n;j++) for (int k=j;k<=100&&i+j+k<=n;k++) { int l=n-i-j-k; if (l<0||l>100) continue; ans=max(ans, s(i)+s(j)+s(k)+s(l)); } printf("%.1lf\n", ans); } return 0; }