#include using namespace std; #ifdef DEBUG #define display(x) cerr << #x << " = " << x << endl; #define eprintf(...) fprintf(stderr, __VA_ARGS__) #else #define display(x) {} #define eprintf(...) do {} while(0) #endif template bool chmin(T &a, const T &b) { return a > b ? a = b, true : false; } template bool chmax(T &a, const T &b) { return a < b ? a = b, true : false; } template ostream& operator << (ostream& out, const vector &v) { int n = v.size(); out << "{"; for(int i = 0; i < n; ++i) { if(i) out << ", "; out << v[i]; } return out << "}"; } template ostream& operator << (ostream& out, const pair &v) { return out << "(" << v.first << ", " << v.second << ")"; } typedef long long LL; typedef pair pii; vector vp = {100, 94, 89, 84, 79, 74, 69, 66, 64, 61, 59}; vector score = {4.3, 4.0, 3.7, 3.3, 3.0, 2.7, 2.3, 2.0, 1.7, 1.0, 0}; double a[101]; double f[5][1000]; int main() { #ifndef LOCAL ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); #endif for(int i = 0; i <= 100; ++i) a[i] = 0; for(int i = 0; i + 1 < (int)vp.size(); ++i) for(int x = vp[i]; x > vp[i + 1]; --x) a[x] = score[i]; for(int i = 0; i < 5; ++i) for(int x = 0; x < 1000; ++x) f[i][x] = 0; for(int i = 1; i < 5; ++i) for(int x = 0; x < 1000; ++x) for(int y = 0; y <= x && y <= 100; ++y) chmax(f[i][x], f[i - 1][x - y] + a[y]); int T; cin >> T; while(T--) { int x; cin >> x; printf("%.1lf\n", f[4][x]); } return 0; }