#include #include #include #include #define N 11 using namespace std; int T; int x; double res; int score[11] = {95, 90, 85, 80, 75, 70, 67, 65, 62, 60, 0}; double cnt[11] = {4.3, 4.0, 3.7, 3.3, 3.0, 2.7, 2.3, 2.0, 1.7, 1.0, 0}; double book[401]; void dfs(int s, int u, double c, int start_s) { // 当前剩余分数, 当前课程数, 当前绩点 if (u == 4) { // 已经选完 book[start_s] = max(book[start_s], c); return; } for (int i = 0; i < N; i++) { if (s >= score[i]) { dfs(s - score[i], u + 1, c + cnt[i], start_s); } } } int main() { cin >> T; while (T--) { scanf("%d", &x); if (x < 60) { printf("0.0\n"); } else { if (!book[x]) { dfs(x, 0, 0.0, x); } printf("%.1lf\n", book[x]); } } return 0; }