#include using namespace std; using u32 = unsigned int; using i64 = long long; using u64 = unsigned long long; float jidian(int x) { if (x < 60) { return 0; } if (x <= 61) { return 1.0; } if (x <= 64) { return 1.7; } if (x <= 66) { return 2.0; } if (x <= 69) { return 2.3; } if (x <= 74) { return 2.7; } if (x <= 79) { return 3.0; } if (x <= 84) { return 3.3; } if (x <= 89) { return 3.7; } if (x <= 94) { return 4.0; } return 4.3; } int main() { // ios::sync_with_stdio(false); // cin.tie(0); vector pre(101); for (int i = 0; i <= 100; ++i) { pre[i] = jidian(i) * 10; } int test; cin >> test; while (test--) { int x; cin >> x; int ans = 0; for (int a = 0; a <= 100 && 4 * a <= x; ++a) { for (int b = a; b <= 100 && a + 3 * b <= x; ++b) { for (int c = b; c <= 100 && a + b + 2 * c <= x; ++c) { int d = x - a - b - c; if (d <= 100) { ans = max(ans, pre[a] + pre[b] + pre[c] + pre[d]); } } } } printf("%.1f\n", ans / 10.0); } }