#include using namespace std; const int A[] = {0, 60, 62, 65, 67, 70, 75, 80, 85, 90, 95, 401}; const double B[] = {0, 1, 1.7, 2, 2.3, 2.7, 3, 3.3, 3.7, 4, 4.3}; int test, x; double f[5][401]; int main() { scanf("%d", &test); for (int i = 1; i <= 4; ++i) for (int j = 0; j <= 400; ++j) for (int k = 0; A[k] <= j; ++k) f[i][j] = max(f[i][j], f[i - 1][j - A[k]] + B[k]); while (test--) { scanf("%d", &x); printf("%.1f\n", f[4][x]); } return 0; }