#include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef unsigned int uint; typedef unsigned long long ull; typedef pair PII; typedef vector VI; #define fi first #define se second #define MP make_pair int read() { int v = 0, f = 1; char c = getchar(); while (c < 48 || 57 < c) {if (c == '-') f = -1; c = getchar();} while (48 <= c && c <= 57) v = (v << 3) + v + v + c - 48, c = getchar(); return v * f; } double a[10000]; double f[10000]; int main() { for (int i = 0; i <= 59; i++) a[i] = 0; for (int i = 60; i <= 61; i++) a[i] = 1.0; for (int i = 62; i <= 64; i++) a[i] = 1.7; for (int i = 65; i <= 66; i++) a[i] = 2.0; for (int i = 67; i <= 69; i++) a[i] = 2.3; for (int i = 70; i <= 74; i++) a[i] = 2.7; for (int i = 75; i <= 79; i++) a[i] = 3.0; for (int i = 80; i <= 84; i++) a[i] = 3.3; for (int i = 85; i <= 89; i++) a[i] = 3.7; for (int i = 90; i <= 94; i++) a[i] = 4.0; for (int i = 95; i <= 100; i++) a[i] = 4.3; for (int i = 1; i <= 4; i++) for (int k = 0; k <= 100; k++) for (int j = 500; j >= k; j--) f[j] = max(f[j], f[j - k] + a[k]); int cas = read(); while (cas--) printf("%.1lf\n", f[read()]); }