#include #include #include #include #include #include #include #include #include #include using namespace std; const int maxn = 110; int T; inline bool IN(int x, int L, int R) { return (x >= L && x <= R); } inline double f(int x) { if (IN(x, 95, 100)) return 4.3; if (IN(x, 90, 94)) return 4.0; if (IN(x, 85, 89)) return 3.7; if (IN(x, 80, 84)) return 3.3; if (IN(x, 75, 79)) return 3.0; if (IN(x, 70, 74)) return 2.7; if (IN(x, 67, 69)) return 2.3; if (IN(x, 65, 66)) return 2.0; if (IN(x, 62, 64)) return 1.7; if (IN(x, 60, 61)) return 1.0; if (IN(x, 0, 59)) return 0.0; } double solve(int tot) { double ans= 0.0; for (int a = 0; a <= 100; ++a) { for (int b = 0; b <= tot - a; ++b) { for (int c = 0; c <= tot - a - b; ++c) { int d = tot - a - b - c; ans = max(ans, f(a) + f(b) + f(c) + f(d)); } } } return ans; } double a[500]; void init() { for (int i = 0; i <= 400; ++i) { if (i <= 100) { a[i] = f(i); } int bound = min(100, i); for (int k = 0; k <= bound; ++k) { a[i] = max(a[i], a[i - k] + f(k)); } } } int tot; int main() { ios::sync_with_stdio(0); init(); cin >> T; while (T--) { cin >> tot; cout << setprecision(1) << fixed << a[tot] << endl; } return 0; }