#include using namespace std; inline double getfuck(int x) { if (x >= 95) return 4.3; else if (x >= 90) return 4.0; else if (x >= 85) return 3.7; else if (x >= 80) return 3.3; else if (x >= 75) return 3.0; else if (x >= 70) return 2.7; else if (x >= 67) return 2.3; else if (x >= 65) return 2.0; else if (x >= 62) return 1.7; else if (x >= 60) return 1.0; else return 0.0; } double f[401]; int main() { for (int i = 1; i <= 400; i++) f[i] = -1e18; f[0] = 0; for (int tc = 1; tc <= 4; tc++) { for (int i = 400; i >= 0; i--) { double res = -1e18; for (int x = 0; x <= min(i, 100); x++) { res = max(res, f[i - x] + getfuck(x)); } f[i] = res; } } int T; scanf("%d", &T); while (T--) { int x; scanf("%d", &x); printf("%.1lf\n", f[x]); } return 0; }