#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define LOG(FMT...) fprintf(stderr, FMT) using namespace std; typedef long long ll; typedef unsigned long long ull; // mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); template istream &operator>>(istream &is, vector &v) { for (T &x : v) is >> x; return is; } template ostream &operator<<(ostream &os, const vector &v) { if (!v.empty()) { os << v.front(); for (int i = 1; i < v.size(); ++i) os << ' ' << v[i]; } return os; } int w[10] = { 60, 62, 65, 67, 70, 75, 80, 85, 90, 95 }; int v[10] = { 10, 17, 20, 23, 27, 30, 33, 37, 40, 43 }; int dp[401][5]; int main() { #ifdef ELEGIA freopen("test.in", "r", stdin); int nol_cl = clock(); #endif ios::sync_with_stdio(false); cin.tie(nullptr); for (int i = 1; i <= 4; ++i) { for (int k = 0; k <= 400; ++k) for (int j = 0; j < 10; ++j) if (w[j] <= k) dp[k][i] = max(dp[k][i], dp[k - w[j]][i] + v[j]); } int t; cin >> t; while (t--) { int x; cin >> x; printf("%.1f\n", dp[x][4] / 10.); } #ifdef ELEGIA LOG("Time: %dms\n", int ((clock() -nol_cl) / (double)CLOCKS_PER_SEC * 1000)); #endif return 0; }