#include #include #include using namespace std; int s[] = { 95, 90, 85, 80, 75, 70, 67, 65, 62, 60, 0 }; double t[] = { 4.3, 4, 3.7, 3.3, 3.0, 2.7, 2.3, 2, 1.7, 1, 0 }; int main() { int T; scanf("%d", &T); while (T--) { int n; scanf("%d", &n); double ans = 0; for (int i = 0; i < 11; i++) { for (int j = 0; j < 11; j++) { for (int tt = 0; tt < 11; tt++) { for (int k = 0; k < 11; k++) { if (s[i] + s[j] + s[tt] + s[k] <= n) { ans = max(ans, t[i] + t[j] + t[tt] + t[k]); } } } } } printf("%.1lf\n", ans); } return 0; }